Skip to content

Instantly share code, notes, and snippets.

View geocarvalho's full-sized avatar
🐼

George Carvalho geocarvalho

🐼
View GitHub Profile
@geocarvalho
geocarvalho / descomplicando-docker.md
Last active August 11, 2021 13:31
Material de docker do "descomplicando docker 2016"

Descomplicando Docker 2016


O que é Docker

  • Docker é uma plataforma Open Source escrito em Go, que é uma linguagem de programação de alto desempenho desenvolvida dentro do Google, que facilita a criação e administração de ambientes isolados.

Containers vs VMs

@geocarvalho
geocarvalho / cnv_regions.py
Last active October 24, 2017 04:21
Annotate exons from bed file present in CNVs from exomedepth
#/usr/bin/env python3
'''
Using exomedepth result and a bed file, organize a txt file with the exons in
the CNV region
usage:
python cnv_regions.py <path/to/exome_depth_output.txt> <path/to/bed_file.bed> <padding>
'''
__author__ = 'George Carvalho'

Comandos Vim

  • insert texto
i, I  # inserir, inserir no começo da linha
a, A  # inserir na linha seguinte, inserir no final
o, O  # inserir abaixo, inserir acima
S  # remove linha e inseri
  • sair de qualquer modo com esc
@geocarvalho
geocarvalho / tmux_commands.md
Last active April 16, 2021 14:55
Tmux help commands

session management

tmux ls (or tmux list-sessions)
tmux new -s session-name
Ctrl-b d Detach from session
tmux attach -t [session name] or tmux a -t [session name]
tmux kill-session -t session-name

Ctrl-b c Create new window
Ctrl-b d Detach current client
@geocarvalho
geocarvalho / reverse-sample-sheet.py
Created May 23, 2017 12:33
Format samplesheet to use in bcl2fastq
from Bio.Seq import Seq
import pandas as pd
import csv
import sys
import os
def reverse_complement(sequence):
"""
Give me the sequence and I give you the reverse-complement of it
"""
@geocarvalho
geocarvalho / fastq_to_file.py
Created May 23, 2017 12:32
Script to organize FASTQs in directories and construct a CSV file input on QIAGEN site taking as argument the bioinfo worklist
import os
import sys
import pandas as pd
#Get the worklist as a parameter
worklist_bioinfo = sys.argv[1]
#Create DataFrame from worklist
header = ['pool', 'analysis_type', 'exame', 'control', 'gender']
worklist_df = pd.read_csv(worklist_bioinfo, header=None, names=header)
@geocarvalho
geocarvalho / list_from_bed.py
Last active May 23, 2017 12:35
list_from_bed.py
import pandas as pd
import numpy as np
import os
import sys
bed_file = sys.argv[1]
name = bed_file.split('.')[0]
#import bed into dataframe
header = ['Chr', 'Start', 'End', 'Gene']