Entering edit mode
4.7 years ago
jaafari.omid
▴
80
Dears all,
Hello. I have some merged bam files and now I want to keep only the reads related to the chromosomes, not MT and not the unlocated reads. I tried using the following command but still I saw MT and the unlocated ones in my file.
samtools view -b CF-F0-filtered.bam NC_031965.2 NC_031966.2 \
NC_031967.2 NC_031969.2 NC_031970.2 NC_031971.2 NC_031972.2 \
NC_031973.2 NC_031974.2 NC_031975.2 NC_031976.2 NC_031977.2 \
NC_031978.2 NC_031979.2 NC_031980.2 NC_031981.2 NC_031982.2 \
NC_031983.2 NC_031984.2 NC_031985.2 NC_031986.2 NC_031987.2 \
> CF-F0-ChrOnly.bam
Any help is appreciated in advance.
Regards,
Omid
what is the output of
The out put is just the Chromosomes! Here is the results:
so, how can you say:
Yes it is weird to me. I said it based on my mpileup. Actually based on two sorted .bam files I generated the mpileup file and when I took its tail command I saw the MT there. Based on your command I checked the two .bam files and there is just Chromosomes but why in mpileup file I have both MT and the unlocated ones?! Maybe it is because of one option that I used in mpileup command. It is running now and will back soon.
Yes, it was because of the option that I used for mpileup generation.
Thank you very much for your great help.
Best regards,
Omid