Microbial-Ecology-Group / AMRplusplus

AMR++ is a bioinformatic pipeline meant to aid in the analysis of raw sequencing reads to characterize the profile of antimicrobial resistance genes, or resistome.
https://www.meglab.org/
GNU General Public License v3.0
25 stars 8 forks source link

runsnp failing #2

Closed LLansing closed 1 year ago

LLansing commented 1 year ago

Nextflow output shows this message for failed runsnp job: [2e/4888ce] NOTE: Process `STANDARD_AMRplusplus_wKraken:FASTQ_RESISTOME_WF:runsnp (NS.1508.003.IDT_i7_165---IDT_i5_165.COR05e_t2_M)\` terminated with an error exit status (1) -- Error is ignored

and the .command.err file shows the following (with absolute paths censored by me after the fact):

+ nxf_launch + /bin/bash -uex /isilon/lacombe-rdc/users/tranlan/amrplusplus/AMRplusplus/work/2e/4888ce3a02f09dbe5aa8aba2b60194/.command.sh + python3 AmrPlusPlus_SNP/SNP_Verification.py -i NS.1508.003.IDT_i7_165---IDT_i5_165.COR05e_t2_M.amr.alignment.sam -o NS.1508.003.IDT_i7_165---IDT_i5_165.COR05e_t2_M_SNPs Traceback (most recent call last): File "/AMRplusplus/work/2e/4888ce3a02f09dbe5aa8aba2b60194/AmrPlusPlus_SNP/SNP_Verification.py", line 110, in config['SOURCE_FILES']['SAM_INPUT'] = arg File "/python-09679a002b117b56bcf8ad7be35338e2/lib/python3.9/configparser.py", line 963, in getitem raise KeyError(key) KeyError: 'SOURCE_FILES'

Fail location in AmrPlusPlus_SNP My amateur suggestion is that the problem is the following:

If this is the cause of the problem, I'm not sure I can patch a solution myself and, if this is not the cause of the problem, I'm even more lost.

Thanks for your help

EnriqueDoster commented 1 year ago

Hi @LLansing ,

Thanks for reporting this and providing a useful suggestion! We had to make a few updates to make things work again due to the requirement from AmrPlusPlus_SNP that the command needs to be run within the main directory. We patched something together now that, while not the prettiest code, will work to get the SNP verification working. Please try pulling the latest updates to AMR++ and run your command, but now including the --snp Y flag. Let me know how that goes for you!

Best, Enrique

LLansing commented 1 year ago

Thanks Enrique, I will be able to test it out next week

LLansing commented 1 year ago

SNP seems to have worked, although there is 1 of my samples missing. The missing sample is present in the results/ResistomeCounts as well as in the non-SNP AMR_analytic_matrix.csv

LLansing commented 1 year ago

I'm not sure if this is the same problem as the run I mentioned in the previous comment, but while running the pipeline again, I noticed 3 samples missing from the SNPconfirmed_AMR_analytic_matrix.csv. The 3 missing samples all failed during the run, showing the following message:

[88/801dcb] NOTE: Process STANDARD_AMRplusplus:FASTQ_RESISTOME_WF:runsnp (CRA02e_t2_M) terminated with an error exit status (1) -- Error is ignored [98/073afc] NOTE: Process STANDARD_AMRplusplus:FASTQ_RESISTOME_WF:runsnp (CRA01e_t2_M) terminated with an error exit status (1) -- Error is ignored [5d/62f34d] NOTE: Process STANDARD_AMRplusplus:FASTQ_RESISTOME_WF:runsnp (CRA03u_t2_M) terminated with an error exit status (1) -- Error is ignored

And each show a similar error in the .command.err files:

+ nxf_launch + /bin/bash -uex /AMRplusplus/work/88/801dcb26e38a048e368ce895f969f3/.command.sh + cp -r /AMRplusplus/bin/AmrPlusPlus_SNP/config.ini /AMRplusplus/bin/AmrPlusPlus_SNP/data /AMRplusplus/bin/AmrPlusPlus_SNP/genes-issues.md /AMRplusplus/bin/AmrPlusPlus_SNP/LICENSE /AMRplusplus/bin/AmrPlusPlus_SNP/README.md /AMRplusplus/bin/AmrPlusPlus_SNP/SNP_Verification_Processes /AMRplusplus/bin/AmrPlusPlus_SNP/SNP_Verification.py /AMRplusplus/bin/AmrPlusPlus_SNP/SNP_Verification_Tools /AMRplusplus/bin/AmrPlusPlus_SNP/usage.md . + python3 SNP_Verification.py -c config.ini -a -i CRA02e_t2_M.alignment.sam -o CRA02e_t2_M_AMR_SNPs --count_matrix AMR_analytic_matrix.csv Traceback (most recent call last): File "/AMRplusplus/work/88/801dcb26e38a048e368ce895f969f3/SNP_Verification.py", line 213, in verify(read, gene, config) File "/AMRplusplus/work/88/801dcb26e38a048e368ce895f969f3/SNP_Verification_Processes/init.py", line 26, in verify checkResult = NonsenseCheck(read, gene, mapOfInterest, seqOfInterest) #Checks for nonsense previously found in literature and for new nonsense File "/AMRplusplus/work/88/801dcb26e38a048e368ce895f969f3/SNP_Verification_Processes/NonsenseCheck.py", line 9, in NonsenseCheck return verifyNonsense(read, gene, stopLocation, mapOfInterest) File "/AMRplusplus/work/88/801dcb26e38a048e368ce895f969f3/SNP_Verification_Processes/NonsenseCheck.py", line 37, in verifyNonsense findNonsenseLocation() File "/AMRplusplus/work/88/801dcb26e38a048e368ce895f969f3/SNP_Verification_Processes/NonsenseCheck.py", line 24, in findNonsenseLocation elif stopLocation < queryIndex: TypeError: '<' not supported between instances of 'int' and 'str'

LLansing commented 1 year ago

Solved at this issue