This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Samtools running time

Hi, guys!

I need some help. I am new using bioinformatics tools, I have no idea of what I am doing. I found a tutorial online that helped me to use Samtools for SNP calling using a bacterial whole genome. I followed the steps and everything went perfectly. But the last step is running for 12 hours now. Is it right? I don't have a clue, 'cause I never did it before. If anyone could tell me if I should wait or kill the process, it would be great!

Thank you!

snp

What's the command you're using for the last step (please also post how you arrived at the input).

These were all the commands I used, since the beginning of the process

bwa index -a bwtsw TW20.fasta
bwa aln TW20.fasta BMB9393.fasta > TW20_BMB9393-bwa.sai
bwa samse TW20.fasta TW20_BMB9393-bwa.sai BMB9393.fasta > TW20_BMB9393.sam
samtools view -S -ub TW20_BMB9393.sam | samtools sort - TW20_BMB9393
samtools index TW20_BMB9393.bam
samtools faidx TW20.fasta
samtools mpileup -g -f TW20.fasta TW20_BMB9393.bam > TW20_BMB9393-raw.bcf
bcftools view -bvcg TW20_BMB9393-raw.bcf > TW20_BMB9393.bcf
bcftools view TW20_BMB9393.bcf | less
/usr/share/samtools/vcfutils.pl varFilter - >> TW20_BMB9393.vcf

1 answer

The last command will never complete. It's waiting for you to pipe input into it but you're not doing that. you want:

bcftools view TW20_BMB9393.bcf | /usr/share/samtools/vcfutils.pl varFilter someoptions > TW20_BMB9393.vcf

If you don't want to filter the VCF, then just don't pipe to vcfutils.pl and instead redirect the output to a file ( ... > file.vcf).

Much better now! Thank you very much!

Log in to answer this question.