Open JiaLonghao1997 opened 1 year ago
Hi,
From the timestamps it seems minimap2 finishes instantly, which isn't a good sign. Is something wrong with the input files or minimap2 executable?
Hello,
I was wondering if you have managed to solve this problem. I'm having a similar issue and would greatly appreciate any help you can give me.
You can just map reads to the contigs by minimap2 before calculating abundance by coverm.
Please use --split-prefix. https://github.com/lh3/minimap2/issues/301
rule mapping_reads_to_contigs: input: r1 = lambda wildcards: sample_reads[wildcards.samp][0], r2 = lambda wildcards: sample_reads[wildcards.samp][1], representative_genes = join(outdir,"cdhit_rep_seq.fna") output: bam = join(outdir, "bam", "{samp}.bam") params: tempdir = join(outdir, "bam", "{samp}_temp_bam") threads: 4 shell:""" /home1/jialh/tools/anaconda3/envs/coverm/bin/minimap2 -t {threads} \ -ax sr --split-prefix {params.tempdir} {input.representative_genes} {input.r1} {input.r2} | \ /home1/jialh/tools/anaconda3/bin/samtools sort --threads {threads} -o {output.bam} """
rule CoverM: input: bam = join(outdir, "bam", "{samp}.bam") output: gene_abundance = join(outdir, "coverm", "{samp}_gene_abundance.txt") params: temp_dir = join(outdir, "coverm", "{samp}_coverm_temp") threads: 4 conda: "/home1/jialh/brain/pipeline/2020NBTbhattlab/CAGs/scripts/coverm.yaml" shell: """ /home1/jialh/tools/anaconda3/envs/coverm/bin/coverm contig \ --bam-files {input.bam} -t {threads} --min-read-percent-identity 0.95 \ --output-file {output.gene_abundance} """
Wanning888 @.***> 于2023年6月26日周一 11:01写道:
Hello,
I was wondering if you have managed to solve this problem. I'm having a similar issue and would greatly appreciate any help you can give me.
— Reply to this email directly, view it on GitHub https://github.com/wwood/CoverM/issues/169#issuecomment-1606520397, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHXJVDKLQGXLW3KXIF6EM5LXND3QPANCNFSM6AAAAAAYZY7MFQ . You are receiving this because you authored the thread.Message ID: @.***>
When we run coverm:
We got the next error. The reference file cdhit_rep_seq.fna is from hundreds of samples, which include the sample SRR13083091. Why do we got this error? How to deal with this issue?