Skip to content

Instantly share code, notes, and snippets.

View marcoscastro's full-sized avatar

Marcos Castro de Souza marcoscastro

View GitHub Profile
EPlATAT00000000138 chr2 96.97 66 2 0 1 66 189 0.80 0.80 2e-24 111
EPlATAT00000000138 chr2 96.97 66 2 0 1 66 189 0.01 0.02 2e-24 111
EPlATAT00000000228 chr2 91.43 35 3 0 9 43 120 0.002 0.003 9e-06 49.1
EPlATAT00000000333 chr2 92.86 42 3 0 42 83 94 0.95 1.0 8e-10 62.1
EPlATAT00000000333 chr2 85.11 47 7 0 31 77 94 0.7 0.7 6e-06 49.1
EPlATAT00000000333 chr2 63.55 31 2 0 1 31 94 0.81 0.82 2e-05 47.3
EPlATAT00000000354 chr2 83.52 91 13 2 1 89 132 0.6 0.7 3e-16 84.2
@marcoscastro
marcoscastro / codigo.py
Created June 5, 2017 23:33
Codigo bioinfo
arquivo = []
with open('arquivoteste.csv') as arq:
linhas = arq.readlines()
for linha in linhas:
coluna = linha.split(',')
qcov = float(coluna[9]) * 100.0
pident = float(coluna[2])
if qcov >= 80.0 and pident >= 80.0:
print(linha)
arquivo.append(linha)
@marcoscastro
marcoscastro / diagonal.c
Created June 4, 2017 15:28
Soma dos elementos da matriz diagonal
#include <stdio.h>
int main(int argc, char *argv[])
{
int mat[2][2] = {{1,2}, {3,4}};
int i, j, soma = 0;
for(i = 0; i < 2; i++)
{
for(j = 0; j < 2; j++)
@marcoscastro
marcoscastro / codigo.py
Created May 25, 2017 21:59
Python - Lendo arquivo fasta
# lendo o arquivo busca.out
nomes = []
with open('busca.out') as arq:
linhas = arq.readlines()
for linha in linhas:
nomes.append(linha.split(' ')[0])
# buscando os nomes no arquivo ensembl34.fa
with open('ensembl34.fa') as arq:
linhas = arq.readlines()
@marcoscastro
marcoscastro / teste.cpp
Created May 14, 2017 16:42
C++ - String retorno
#include <iostream>
#include <string.h>
using namespace std;
class Pessoa
{
private:
char nome[100];
public:
@marcoscastro
marcoscastro / classe.cpp
Created May 5, 2017 22:34
Definição de uma classe - C++
class Pessoa
{
private:
char nome[100];
int idade;
float peso;
};
@marcoscastro
marcoscastro / classe.cpp
Created May 5, 2017 22:34
Definição de uma classe - C++
class Pessoa
{
private:
char nome[100];
int idade;
float peso;
};
@marcoscastro
marcoscastro / form.html
Created May 3, 2017 01:35
Form site curso flask
<!-- Formulário -->
<form action="https://leadlovers.com/Pages/Index/122345" method="post" >
<input id="id" name="id" type="hidden" value="122345" />
<input id="pid" name="pid" type="hidden" value="3500785" />
<input id="list_id" name="list_id" type="hidden" value="122345" />
<input id="provider" name="provider" type="hidden" value="leadlovers" />
<label for="name">Nome:</label>
<input class="form-control" id="name" name="name" placeholder="Nome:" type="text" />
<label for="email">E-mail:</label>
<input class="form-control" id="email" name="email" placeholder="Email:" type="text" />
@marcoscastro
marcoscastro / teste.py
Created April 28, 2017 03:27
Curso Python 300 - Aula 32 - Else com Loops
lista = [20, 10, 5, 30]
item = 30
'''
for i in lista:
if i == item:
print('Item encontrado')
break
else:
print('O item nao foi encontrado')
@marcoscastro
marcoscastro / exemplo.cpp
Created March 31, 2017 00:44
C++ - Lista de vetores
#include <iostream>
#include <vector>
#include <list>
using namespace std;
int main(int argc, char *argv[])
{
// criando os vetores e adicionando elementos aos vetores
vector<int> v1, v2;