Postagens

Para matar o processo no linux

  killall -s 9 [process name]

Ajuda para Biopython

 Tutorial e Cookbook: https://biopython.org/DIST/docs/tutorial/Tutorial.html Biopython FAQ: https://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc5

Executar o mrbayes em paralelo

 mpirun -np 6 /usr/local/bin/mb se o programa não estiver instalado em ambiente conda, não se esqueça de sair dele antes de tentar rodar ;)

Usando o STRUCTURE

 structure_threader run -i Ugibba_filtered1_ref.vcf -o ./results2 -als ~/anaconda3/envs/structure/bin/alstructure_wrapper.R -K 15 -t 3 --ind Ugibba.indfile Fonte: https://radcamp.github.io/Lisbon2020/05_POPULATION_STRUCTURE.html Sendo que o arquivo ind: The “indfile” Open the file with your favorite text editor. If you don’t have one and want to stay on the CLI, you can try the command  nano ~/str_analyses/oyster.indfile  in a new terminal window. The first few lines of this file should look like this: BC1_10_C6 Victoria_BC 4 BC1_20_C6 Victoria_BC 4 BC1_22_C7 Victoria_BC 4 BC1_4_C3 Victoria_BC 4 BC1_7_C5 Victoria_BC 4 BC1_8_C4 Victoria_BC 4 BC1_9_C5 Victoria_BC 4 BC2_10_C5 Klaskino_BC 1

Tirar seqs redundantes

  https://bioinf.shenwei.me/seqkit/ conda install -c bioconda seqkit seqkit rmdup -s < in .fa > out.fa

Para instalar o StructRNAfinder

DOWNLOAD  and collaborate on StructRNAfinder development by accessing in our  GitHub account . All information to install and run it can be accessed there. Installing the stand-alone version:   (Only for linux) To see more details related to the installation process please see the INSTALL file. To install structRNAfinder and its requirements, type in a terminal located in structRNAfinder folder: sudo sh install.sh And follow the provided instructions. Pre-Requisites: StructRNAfinder uses third-part softwares and in-house Perl scripts in order to perform all its workflow. All them are automatically installed and configured when installing the tool. Bellow a list of softwares necessary to use it. Perl Linux perl library libgd-perl ( apt-get install libgd-perl ) Perl package  Bio::Graphics ( cpan install Bio::Graphics ) Infernal RNAfold  from  Vienna package Rfam  covariance models ( Version 12 ) As vezes tem que instalar o Bio::Graphics de novo depois, b...

tbl2asn

 tbl2asn -t ../template_CPs.sbt -i Uf_v2.fasta -j "[organism=Utricularia ] [voucher=xxxx]" -f U_nw. tbl  -V vb

separando genoma em arquivos menores (5000 sequências em cada arquivo), no exemplo.

 awk 'BEGIN {n_seq=0;} /^>/ {if(n_seq%5000==0){file=sprintf("myseq%d.fa",n_seq);} print >> file; n_seq++; next;} { print >> file; }' < Athaliana_447_Araport11.protein_primaryTranscriptOnly_renamed.fa

Média da primeira coluna usando awk

 awk '{ total += $1 } END { print total/NR }'

introntab - contar tamanho dos introns

 ./introntab.pl --format gtf < xxxx-braker.gtf | column -t -s$'\t' | less -S Com o output usar colunas para contar

Retirar SVG de página da web - exemplo Google Chart

Entrar pelo google ferramentas do desenvolvedor  When the SVG is integrated as   <svg ...></svg>   markup directly into the HTML page. Right click on the SVG to inspect it in developer tools Find the root of the  <svg>  element and right click to  "Copy element" Go to  https://jakearchibald.github.io/svgomg/  and  "Paste markup" Download your optimized SVG file and enjoy
 Retirado de: https://playingwithgenomics.wordpress.com/2015/07/15/producing-a-bam-file-and-extracting-unique-reads-from-bowtie2-results/ I am always looking for ways to keep my disk usage down. Especially since I’ve been mapping close to 100 Chip-Seq files. I find that 1) piping Bowtie2 output into samtools to create a bam file and 2) keeping only the uniquely mapped reads help a lot. Here is how I do those: I’m dealing with single-end data here. You can modify the command if you are dealing with paired-end data. Text written in red should be substituted according to your data. Converting Bowtie2 output to bam file bowtie2 -x BOWTIE2_INDEX -\ -p NUM_THREADS \ -U INPUT_FILE.fastq.gz | samtools view -bS -t \ YOUR_GENOME_INDEX.fa.fai - > output.bam Counting unique reads You basically can exploit the XS tag that are set by Bowtie2  for reads that can be mapped in multiple places. Therefore, uniquely mapped reads lack the XS tag. The following command exclude u...

Platanus

  Platanus_trim xxx_1.fastq xxx_2.fastq   Platanus assemble -o Pxut -f ./DRR02167[34]_[12].fastq 2> assemble.log Platanus scaffold -o Pxut -c Pxut_contig.fa -b Pxut_contigBubble.fa -IP1 ./DRR021673_1.fastq ./DRR021673_2.fastq –IP2 ./DRR021674_1.fastq ./DRR021674_2.fastq -OP3 ./DRR021675_1.fastq ./DRR021675_2.fastq ./DRR021676_1.fastq ./DRR021676_2.fastq 2> scaffold.log   Platanus gap_close -o Pxut -c Pxut_scaffold.fa -IP1 ./DRR021673_1.fastq ./DRR021673_2.fastq –IP2 ./DRR021674_1.fastq ./DRR021674_2.fastq -OP3 ./DRR021675_1.fastq ./DRR021675_2.fastq ./DRR021676_1.fastq ./DRR021676_2.fastq 2> gapclose.log    

Misturar colunas

 cat clt_Uvol_align.sh | awk '{print $1,$2,$3,$4,$5,$6,$7,S8,$6}' > clt_Uvol_align2.sh

^M: interpretador incorreto

Quando: bash: xxxx /usr/bin/xxxx^M: interpretador incorreto: Arquivo ou diretório inexistente sed - i - e 's/\r$//' [nome do script]

Para HyPhy (CMAKE)

Para usar o Hyphy, de preferência compilar da source pois as vezes não acha as bibliotecas necessárias no sistema. Para Hyphy  Kitware now has an APT repository that currently supports Ubuntu 16.04, 18.04 and 20.04 Install Instructions: Remove old version of cmake sudo apt purge --auto-remove cmake Obtain a copy of the signing key wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null Add the repository to your sources list a. For Ubuntu Focal Fossa (20.04) sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' b. For Ubuntu Bionic Beaver (18.04) sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' c. For Ubuntu Xenial Xerus (16.04) sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main' Update and install sudo apt update sudo apt install cmake
Pegar arquivos "nome ebps" para a pasta atual ln -s */ebps*.fasta .

MCScanX, como passar o erro: make: *** [mcscanx] Error 1"

Erro: " msa.cc: In function ‘void msa_main(const char*)’: msa.cc:289:22: error: ‘chdir’ was not declared in this scope if (chdir(html_fn)<0) ^ make: *** [mcscanx] Error 1" Para passar esse erro: Colocar a linha:   #include <unistd.h> Nos arquivos: msa.h dissect_multiple_alignment.h detect_collinear_tandem_arrays.h   Preparando arquivo gff3 do Phytozome para gff para o MCScanX:   cat annotation.all_transcripts.all_features.ptr.gff3 | cut -f 1,4,5,9 | sed 's/ID=//g' | sed 's/;/\t/g' | grep "\tid=" | cut -f 1,2,3,4 | awk '{print $1" "$4" "$2" "$3}' > annotation.all_transcripts.all_features.ptr.gff  e cat annotation.all_transcripts.all_features.ptr.gff | sed 's/ /\t/g' > annotation.all_transcripts.all_features.ptr_2.gff   Se for comparar dois genomas tem que colocar os dois gffs no mesmo arquivo?  
Para verificar nomes de plantas e família: http://tnrs.iplantcollaborative.org/TNRSapp.html

Instalar o VMPlayer no Linux Ubuntu

Quando fui instalar o VMPlayer no Linux encontrei o seguinte erro: Extracting VMware Installer...done. Installing VMware Player Application 15.5.0 Copying files... Configuring... bora/lib/string/str.c:284 Buffer too small VMware Workstation Error: VMware Workstation unrecoverable error: (host-9802) bora/lib/string/str.c:284 Buffer too small You can request support.  To collect data to submit to VMware support, choose "Collect Support Data" from the Help menu. You can also run the "vm-support" script in the Workstation folder directly. We will respond on the basis of your support entitlement. A solução foi: sudo LC_ALL=C ./VMware-Player-15.5.0-14665864.x86_64.bundle