I want to do variant calling by using samtools and bcftools. As the pipelines that I found on the internet, I should run the following commands:
1. samtools view -bS aligned.sam > aligned.bam 2. samtools sort aligned.bam aligned_sorted 3. samtools faidx genome.fasta 4. samtools mpileup -I -u -f genome.fasta aligned_sorted.bam > pileup.bcf 5. bcftools call -cv pileup.bcf > variant.bcf
In the second command, I face with the following error
[bam_sort] Use -T PREFIX / -o FILE to specify temporary and final output files
and for fixing that I use following command:
samtools sort aligned.bam > aligned_sorted
but I think that it is not right and it disrupts the pipeline. (although the pipeline can runs until end)
And I have another problem. How can I reports the reads Id in the varinat.bcf file?