marbl / metAMOS

A metagenomic and isolate assembly and analysis pipeline built with AMOS
http://marbl.github.io/metAMOS
Other
93 stars 45 forks source link

Error in FindORFs: cannot unlink file #202

Closed fwhelan closed 9 years ago

fwhelan commented 9 years ago

Hello, I've been running into the below issue. I've tried running in sudo bash in case it was a file permission issue. (I've changed the full path of my data to preserve data privacy).

Envoked:

initPipeline -q -1 Sample_R1.fastq -2 Sample_R2.fastq -d Sample_metAMOS -i 300:500
runPipeline -d Sample_metAMOS -p 22 -a idba -c kraken -f Assemble,MapReads,FindORF

Output:

...
Completed Task = assemble.CheckAsmResults
Uptodate Task = assemble.SplitMappers
Starting Task = mapreads.MAPREADS
    Job  = [idba-ud.31.asm.contig -> idba-ud.31.contig.cvg] completed
Completed Task = mapreads.MapReads
    Job  = [[idba-ud.31.contig.cvg] -> [mapreads.ok]] completed
Completed Task = mapreads.CheckMapResults
Uptodate Task = mapreads.SplitForORFs
Starting Task = findorfs.FINDORFS
*****************************************************************
*************************ERROR***********************************
During findorfs, the following command failed with return code -11:
>> /home/metAMOS-1.5rc3/Utilities/cpp/Linux-x86_64/FragGeneScan -s /home/Sample_metAMOS/FindORFS/in/idba-ud.31.asm.contig -o /home/Sample_metAMOS/FindORFS/out/idba-ud.31.orfs -w 0 -t complete

*************************DETAILS***********************************
Last 10 commands run before the error (/home/Sample_32_metAMOS/Logs/COMMANDS.log)
|2015-04-28 09:40:19|# [MAPREADS]
|2015-04-28 09:40:29| /home/metAMOS-1.5rc3/Utilities/cpp/Linux-x86_64/bowtie-build -o 2 /home/Sample_metAMOS/Assemble/out/idba-ud.31.asm.contig /home/Sample_metAMOS/Assemble/out/idba-ud.31.IDX
|2015-04-28 09:42:28| /home/metAMOS-1.5rc3/Utilities/cpp/Linux-x86_64/bowtie  -p 22 -l 25 -e 140 --best --strata -m 10 -k 1 --un /home/Sample_metAMOS/Assemble/out/idba-ud.31.lib1.unaligned.seq /home/Sample_metAMOS/Assemble/out/idba-ud.31.IDX /home/Sample_metAMOS/Preprocess/out/lib1.seq > /home/Sample_metAMOS/Assemble/out/lib1.bout
|2015-04-28 09:42:42| java -cp /home/metAMOS-1.5rc3/Utilities/java:. convertFastqToFasta /home/Sample_metAMOS/Assemble/out/idba-ud.31.lib1.unaligned.seq /home/Sample_metAMOS/Assemble/out/idba-ud.31.lib1.unaligned.fasta /home/Sample_metAMOS/Assemble/out/idba-ud.31.lib1.unaligned.fasta.qual
|2015-04-28 09:47:25| cat /home/Sample_metAMOS/Assemble/out/idba-ud.31.lib1.mappedmates >> /home/Sample_metAMOS/Assemble/out/idba-ud.31.lib1.hdr 
|2015-04-28 09:47:26| cp /home/Sample_metAMOS/Assemble/out/idba-ud.31.lib1.hdr /home/Sample_metAMOS/Assemble/out/idba-ud.31.lib1.mappedmates 
|2015-04-28 09:48:02|# [FINDORFS]
|2015-04-28 09:48:03| unlink /home/Sample_metAMOS/FindORFS/in/idba-ud.31.asm.contig
|2015-04-28 09:48:03| ln /home/Sample_metAMOS/Assemble/out/idba-ud.31.asm.contig /home/Sample_metAMOS/FindORFS/in/idba-ud.31.asm.contig
|2015-04-28 09:48:03| /home/metAMOS-1.5rc3/Utilities/cpp/Linux-x86_64/FragGeneScan -s /home/Sample_metAMOS/FindORFS/in/idba-ud.31.asm.contig -o /home/Sample_metAMOS/FindORFS/out/idba-ud.31.orfs -w 0 -t complete

Last 10 lines of output (/home/Sample_metAMOS/Logs/FINDORFS.log)
unlink: cannot unlink ‘/home/Sample_metAMOS/FindORFS/in/idba-ud.31.asm.contig’: No such file or directory

Please veryify input data and restart MetAMOS. If the problem persists please contact the MetAMOS development team.
*************************ERROR***********************************
*****************************************************************
rm: cannot remove ‘/home/Sample_metAMOS/Logs/findorfs.ok’: No such file or directory
Oops, MetAMOS finished with errors! see text in red above for details.

Directory structure:

.../FindORFS/in$ ls -lah
total 6.6M
drwxrwxr-x 2 whelanfj whelanfj 4.0K Apr 28 09:48 .
drwxrwxr-x 4 whelanfj whelanfj 4.0K Apr 28 08:44 ..
-rw-rw-r-- 2 whelanfj whelanfj 6.6M Apr 28 09:40 idba-ud.31.asm.contig
/FindORFS/out$ ls -lah
total 8.0K
drwxrwxr-x 2 whelanfj whelanfj 4.0K Apr 28 09:48 .
drwxrwxr-x 4 whelanfj whelanfj 4.0K Apr 28 08:44 ..
-rw-rw-r-- 1 whelanfj whelanfj    0 Apr 28 09:48 idba-ud.31.orfs
-rw-rw-r-- 1 whelanfj whelanfj    0 Apr 28 09:48 idba-ud.31.orfs.faa
-rw-rw-r-- 1 whelanfj whelanfj    0 Apr 28 09:48 idba-ud.31.orfs.ffn
/Assemble/out$ ls -lah
total 4.9G
drwxrwxr-x 3 whelanfj whelanfj 4.0K Apr 28 09:48 .
drwxrwxr-x 4 whelanfj whelanfj 4.0K Apr 28 08:44 ..
-rw-rw-r-- 1 whelanfj whelanfj    0 Apr 28 09:40 assemble.success
-rw-rw-r-- 1 whelanfj whelanfj   52 Apr 28 09:48 contigs_wo_location_info.txt
drwxrwxr-x 2 whelanfj whelanfj 4.0K Apr 28 09:39 idba-ud.31.asm
-rw-rw-r-- 2 whelanfj whelanfj 6.6M Apr 28 09:40 idba-ud.31.asm.contig
-rw-rw-r-- 2 whelanfj whelanfj 6.5M Apr 28 09:39 idba-ud.31.asm.contigWIUPAC.fa
-rw-rw-r-- 1 whelanfj whelanfj 1.7G Apr 28 09:47 idba-ud.31.asm.tigr
-rw-rw-r-- 1 whelanfj whelanfj 4.4K Apr 28 09:47 idba-ud.31.contig.cnt
-rw-rw-r-- 1 whelanfj whelanfj 5.0K Apr 28 09:47 idba-ud.31.contig.cvg
-rw-rw-r-- 1 whelanfj whelanfj 5.9M Apr 28 09:40 idba-ud.31.IDX.1.ebwt
-rw-rw-r-- 1 whelanfj whelanfj 6.5M Apr 28 09:40 idba-ud.31.IDX.2.ebwt
-rw-rw-r-- 1 whelanfj whelanfj 2.5K Apr 28 09:40 idba-ud.31.IDX.3.ebwt
-rw-rw-r-- 1 whelanfj whelanfj 1.7M Apr 28 09:40 idba-ud.31.IDX.4.ebwt
-rw-rw-r-- 1 whelanfj whelanfj 5.9M Apr 28 09:40 idba-ud.31.IDX.rev.1.ebwt
-rw-rw-r-- 1 whelanfj whelanfj 6.5M Apr 28 09:40 idba-ud.31.IDX.rev.2.ebwt
-rw-rw-r-- 1 whelanfj whelanfj 7.6K Apr 28 09:47 idba-ud.31.lib1.badmates
-rw-rw-r-- 1 whelanfj whelanfj 192M Apr 28 09:45 idba-ud.31.lib1contig.reads
-rw-rw-r-- 1 whelanfj whelanfj 111M Apr 28 09:47 idba-ud.31.lib1.hdr
-rw-rw-r-- 1 whelanfj whelanfj 111M Apr 28 09:47 idba-ud.31.lib1.mappedmates
-rw-rw-r-- 1 whelanfj whelanfj 524K Apr 28 09:47 idba-ud.31.lib1.mates_in_diff_contigs
-rw-rw-r-- 1 whelanfj whelanfj   30 Apr 28 09:47 idba-ud.31.lib1.meanstdev
-rw-rw-r-- 1 whelanfj whelanfj  51M Apr 28 09:42 idba-ud.31.lib1.unaligned.fasta
-rw-rw-r-- 1 whelanfj whelanfj 125M Apr 28 09:42 idba-ud.31.lib1.unaligned.fasta.qual
-rw-rw-r-- 1 whelanfj whelanfj 100M Apr 28 09:42 idba-ud.31.lib1.unaligned.seq
-rw-rw-r-- 1 whelanfj whelanfj 6.6M Apr 28 09:48 idba-ud.31.seq100.contig
-rw-rw-r-- 1 whelanfj whelanfj 2.5G Apr 28 09:42 lib1.bout
-rw-rw-r-- 1 whelanfj whelanfj    0 Apr 28 09:48 mapreads.success
-rw-rw-r-- 1 whelanfj whelanfj    3 Apr 28 09:02 proba.kmer

Greatly appreciated! --Fiona

skoren commented 9 years ago

Hi,

This looks like FragGeneScan is failing on your system. We've seen issues with it on some systems/datasets (for example issue #179). I'd recommend installing MetaGeneMark and adding it to your path. You can then tell metAMOS to use it instead of FragGeneScan (-g metagenemark).

fwhelan commented 9 years ago

Thanks, works well; great work around!

Down the road, if I see an advantage of using FragGeneScan, would there be something you could suggest for me to look into to get it working on my system?

skoren commented 9 years ago

I would suggest downloading the FragGeneScan latest version source, building on your system, and replacing the binary in metAMOS/Utilities/cpp/Linux-x86_64/ to see if it works.