wwood / CoverM

Read coverage calculator for metagenomics
GNU General Public License v3.0
273 stars 30 forks source link

Question about the bam file #212

Closed jiaojiaoguan closed 1 month ago

jiaojiaoguan commented 1 month ago

Hi developer,

Thanks for your tool. I am confused about the parameter "-b, --bam-files PATH". Now, I am planning to use the below command to calculate the RPKM, but I do not know how to get the "bam" file. Can you give me some help?

coverm contig -1 L2_host_removed.R1.fq.gz -2 L2_host_removed.R2.fq.gz -r contigs.fasta -o sample.tsv --mapper bwa-mem --min-read-aligned-percent 95 --min-read-percent-identity 90 --min-covered-fraction 75 --methods rpkm -t 56

Best, Jiaojiao

wwood commented 1 month ago

Hi,

-b is an input, I think you are after --bam-file-cache-directory instead, which is an output. ben

jiaojiaoguan commented 1 month ago

From my understanding, bam files contain the mapping information between the reads and contigs. In above command,

Firstly, I think bwa tool will use the reference contig to build the index database. And then use bwa tool to make alignment between the reads and the database. Third, SAMtools will be used to convert the sam file into the bam file. So, I do not need to provide the bam file. Fouth, if some reads can not satisfied the above cutoff will be remove and then calculate the RPKM.

am I right?

Best, Jiaojiao

wwood commented 1 month ago

That's all correct, and all that happens within CoverM, so you don't need to sweat the details (or provide a BAM as input).

jiaojiaoguan commented 1 month ago

Thanks a lot!

That's all correct, and all that happens within CoverM, so you don't need to sweat the details (or provide a BAM as input).