jtamames / SqueezeMeta

A complete pipeline for metagenomic analysis
GNU General Public License v3.0
346 stars 81 forks source link

Stopping in STEP10 -> 10.mapsamples.pl. Program finished abnormally #724

Closed Michaelijesse closed 10 months ago

Michaelijesse commented 10 months ago

This is SYSLOG out

[17 hours, 18 minutes, 44 seconds]: STEP10 -> 10.mapsamples.pl Creating Bowtie reference: python3 /home/ec2-user/han/20230828_WMS_test_2/SqueezeMeta/bin/bowtie2/bowtie2-build --quiet /home/ec2-user/han/20230828_WMS_test_2/output/Samples/results/01.Samples.fasta /home/ec2-user/han/20230828_WMS_test_2/output/Samples/data/Samples.bowtie Getting raw reads for SRR1927149: cp /home/ec2-user/han/20230828_WMS_test_2/input/raw/SRR1927149_1.fastq.gz /home/ec2-user/han/20230828_WMS_test_2/output/Samples/temp/Samples.SRR1927149.current_1.gz; cp /home/ec2-user/han/20230828_WMS_test_2/input/raw/SRR1927149_2.fastq.gz /home/ec2-user/han/20230828_WMS_test_2/output/Samples/temp/Samples.SRR1927149.current_2.gz; Aligning with bowtie: /home/ec2-user/han/20230828_WMS_test_2/SqueezeMeta/bin/bowtie2/bowtie2 -x /home/ec2-user/han/20230828_WMS_test_2/output/Samples/data/Samples.bowtie -1 /home/ec2-user/han/20230828_WMS_test_2/output/Samples/temp/Samples.SRR1927149.current_1.gz -2 /home/ec2-user/han/20230828_WMS_test_2/output/Samples/temp/Samples.SRR1927149.current_2.gz --quiet -p 12 -S /home/ec2-user/han/20230828_WMS_test_2/output/Samples/data/bam/Samples.SRR1927149.sam --very-sensitive-local Stopping in STEP10 -> 10.mapsamples.pl. Program finished abnormally

Michaelijesse commented 10 months ago

Could you please sort this out. why its happening. Even this is sample dataset

Michaelijesse commented 10 months ago

This is Terminal Out

[0 seconds]: STEP10 -> MAPPING READS: 10.mapsamples.pl Reading samples from /home/ec2-user/han/20230828_WMS_test_2/output/Samples/data/00.Samples.samples Metagenomes found: 2 Mapping with Bowtie2 (Langmead and Salzberg 2012, Nat Methods 9(4), 357-9) Creating reference from contigs Working with sample 1: SRR1927149 Getting raw reads Aligning to reference with bowtie BAM file already found in /home/ec2-user/han/20230828_WMS_test_2/output/Samples/data/bam/Samples.SRR1927149.bam, skipping Calculating contig coverage Reading contig length from /home/ec2-user/han/20230828_WMS_test_2/output/Samples/intermediate/01.Samples.lon Illegal division by zero at /home/ec2-user/han/20230828_WMS_test_2/SqueezeMeta/scripts/10.mapsamples.pl line 445. Stopping in STEP10 -> 10.mapsamples.pl. Program finished abnormally

If you don't know what went wrong or want further advice, please look for similar issues in https://github.com/jtamames/SqueezeMeta/issues Feel free to open a new issue if you don't find the answer there. Please add a brief description of the problem and upload the /home/ec2-user/han/20230828_WMS_test_2/output/Samples/syslog file (zip it first)

fpusan commented 10 months ago

What's your OS and version? Can you share the /home/ec2-user/han/20230828_WMS_test_2/output/Samples/syslog file with us here?

Michaelijesse commented 10 months ago

I am working in ec2 server. Instance type : M5.2xlarge syslog.zip

fpusan commented 10 months ago

So what OS and version are you running there?

fpusan commented 10 months ago

Can you run manually the following command and let me know what error is raised?

/home/ec2-user/han/20230828_WMS_test_2/SqueezeMeta/bin/bowtie2/bowtie2 -x /home/ec2-user/han/20230828_WMS_test_2/output/Samples/data/Samples.bowtie -1 /home/ec2-user/han/20230828_WMS_test_2/output/Samples/temp/Samples.SRR1927149.current_1.gz -2 /home/ec2-user/han/20230828_WMS_test_2/output/Samples/temp/Samples.SRR1927149.current_2.gz --quiet -p 12 -S /home/ec2-user/han/20230828_WMS_test_2/output/Samples/data/bam/Samples.SRR1927149.sam --very-sensitive-local

Michaelijesse commented 10 months ago

Sure I will run and post the output here. Thank you.

Michaelijesse commented 10 months ago

I tried it successfully. No Error. It took approx 30mins. SAM file created in the bam folder.

$ cd /home/ec2-user/han/20230828_WMS_test_2/ $ /home/ec2-user/han/20230828_WMS_test_2/SqueezeMeta/bin/bowtie2/bowtie2 -x /home/ec2-user/han/20230828_WMS_test_2/output/Samples/data/Samples.bowtie -1 /home/ec2-user/han/20230828_WMS_test_2/output/Samples/temp/Samples.SRR1927149.current_1.gz -2 /home/ec2-user/han/20230828_WMS_test_2/output/Samples/temp/Samples.SRR1927149.current_2.gz --quiet -p 12 -S /home/ec2-user/han/20230828_WMS_test_2/output/Samples/data/bam/Samples.SRR1927149.sam --very-sensitive-local $

fpusan commented 10 months ago

Ok, then can you run /home/ec2-user/han/20230828_WMS_test_2/SqueezeMeta/bin/samtools sort /home/ec2-user/han/20230828_WMS_test_2/output/Samples/data/bam/Samples.SRR1927149.sam -o /home/ec2-user/han/20230828_WMS_test_2/output/Samples/data/bam/Samples.SRR1927149.bam -@ 12

/home/ec2-user/han/20230828_WMS_test_2/SqueezeMeta/bin/samtools index /home/ec2-user/han/20230828_WMS_test_2/output/Samples/data/bam/Samples.SRR1927149.bam -@ 12

It should fail in one of these two

Michaelijesse commented 10 months ago

image

Michaelijesse commented 10 months ago

OS : amazon-linux (centos)

Michaelijesse commented 10 months ago

I have chosen this tool for metagenomic assembly for multiple good reasons. but due to errors at some steps, I cant able to come to conclusion. Could you please sort this out.?

Michaelijesse commented 10 months ago

Lines 445,446,447 my $mapperc=($mappedreads/$totalreadcount)*100; if($mapperc<50) { $warnmes=1; } printf outfile1 "$thissample\t$totalreadcount\t$mappedreads\t%.2f\t$totalreadlength\n",$mapperc; #-- Mapping statistics

fpusan commented 10 months ago

Hi again

Did you run these two specific commands as I suggested above?

/home/ec2-user/han/20230828_WMS_test_2/SqueezeMeta/bin/samtools sort /home/ec2-user/han/20230828_WMS_test_2/output/Samples/data/bam/Samples.SRR1927149.sam -o /home/ec2-user/han/20230828_WMS_test_2/output/Samples/data/bam/Samples.SRR1927149.bam -@ 12

/home/ec2-user/han/20230828_WMS_test_2/SqueezeMeta/bin/samtools index /home/ec2-user/han/20230828_WMS_test_2/output/Samples/data/bam/Samples.SRR1927149.bam -@ 12

If so, which one of those failed?

fpusan commented 10 months ago

Also was this installed through conda? In the screenshot above I can see that you are in the (base) environment, which suggests that you installed it manually. SqueezeMeta has not been tested in amazon linux so certain binaries may not work properly there. I pretty much suspect that samtools is failing in your case. If we confirm that (see my post above to test it) we can start testing for solutions.

Michaelijesse commented 10 months ago

Helllo, Output from Bowtie2. image image image

fpusan commented 10 months ago

Ok, I have uploaded a dev version that may fix this issue Try mamba create -n SqueezeMeta_dev -c conda-forge -c bioconda -c anaconda -c fpusan squeezemeta-dev=1.6.3.beta1 --no-channel-priority And then conda activate SqueezeMeta_dev and run the test data again using the SqueezeMeta.pl executable present in your PATH

fpusan commented 10 months ago

Note that you will need to start a new project, restarting won't work in this case since the run was bugged

fpusan commented 10 months ago

And of course after making the new install you'll need to link it to the old databases using configure_nodb.pl (check the ReadMe for details)

fpusan commented 10 months ago

configure_nodb.pl will also trigger a series of tests, including some tests to check that certain binaries can be executed in your system. Can you share with me the output of that after running it on the new SQM install?

Michaelijesse commented 10 months ago

Hello,

Running configure_nodb.pl, failed mothur configuration. Even I installed Mothur through conda but Test failed.

image

Michaelijesse commented 10 months ago

Installed mothur. image

fpusan commented 10 months ago

That's encouraging. mothur is not needed for the main SqueezeMeta pipeline (though I see you made It work regardless) Then can you try running the pipeline again using the conda version?

Michaelijesse commented 10 months ago

Hello, Thank you for your guidance and support. The whole process completed successfully.

Michaelijesse commented 10 months ago

So closing the issue

fpusan commented 10 months ago

Great! We will release a new version incorporating these changes shortly