jtamames / SqueezeMeta

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

combine-sqm-tables.py error #322

Closed fpeti11 closed 3 years ago

fpeti11 commented 3 years ago

Buenos días

I managed to run SqueezeMeta in sequential mode for a couple of samples, but now I would like to merge them. I found combine-sqm-tables.py, but I got error. Am I understood it right that I need to add whole SqueezeMeta results as input to this program?

combine-sqm-tables.py s1 s2 Creating tables for project s1 COG0468 (RecA/RadA) was not present in your data. This is weird, as RecA should be universal, so you probably just skipped COG annotation. Skipping copy number calculation... Traceback (most recent call last): File "/home/microbiomics/miniconda3/envs/SqueezeMeta/bin/combine-sqm-tables.py", line 312, in main(parse_args()) File "/home/microbiomics/miniconda3/envs/SqueezeMeta/bin/combine-sqm-tables.py", line 182, in main parse_table('{}/results/tables/{}.KO.abund.tsv'.format(projPath, projName), KOabund) File "/home/microbiomics/miniconda3/envs/SqueezeMeta/bin/combine-sqm-tables.py", line 275, in parse_table with open(path) as infile: FileNotFoundError: [Errno 2] No such file or directory: 's1/results/tables/s1.KO.abund.tsv'

Could you please give me some advice how to solve this problem, it would be important for us.

Have a nice day Peter

fpusan commented 3 years ago

What command line did you use to run SqueezeMeta? Can you share the SqueezeMeta_conf.pl file inside the s1 directory?

fpeti11 commented 3 years ago

I attached the file

fpusan commented 3 years ago

It doesn't seem to be there. Can you double check?

fpeti11 commented 3 years ago

Sqm.txt Sorry I had some difficulties with uploading.

fpusan commented 3 years ago

Ok, I suspect that the problem is related to the fact that you completely skipped functional annotations. In theory I fixed that in 7750bac... what SqueezeMeta version are you using?

fpeti11 commented 3 years ago

Thanks, I will try to download the latest SqueezeMeta version.

fpusan commented 3 years ago

Ok, let me know if it works.

fpeti11 commented 3 years ago

Hello,

I managed to update to the latest SqueezeMeta, but when I run with s1 and s2 sample it seemed like my older version did not create everything that the program needs. I am trying SqueezeMeta (the latest version) on HPC also, so I downloaded files, and run this one: combine-sqm-tables.py s11 s12 /home/microbiomics/miniconda3/envs/SqueezeMeta_v1.4.0/bin/combine-sqm-tables.py:62: UserWarning: combine-sqm-tables.py has been superseded by the combineSQMlite function of the SQMtools R package. Please consider using that instead warnings.warn('combine-sqm-tables.py has been superseded by the combineSQMlite function of the SQMtools R package. Please consider using that instead') Creating tables for project s11 COG0468 (RecA/RadA) was not present in your data. This is weird, as RecA should be universal, so you probably just skipped COG annotation. Skipping copy number calculation... Project at s11/s11 is missing KEGG annotations, so they will be not included in the combined tables Project at s11/s11 is missing COG annotations, so they will be not included in the combined tables Project at s11/s11 is missing PFAM annotations, so they will be not included in the combined tables Creating tables for project s12 Traceback (most recent call last): File "/home/microbiomics/miniconda3/envs/SqueezeMeta_v1.4.0/SqueezeMeta/utils/sqm2tables.py", line 218, in main(parse_args()) File "/home/microbiomics/miniconda3/envs/SqueezeMeta_v1.4.0/SqueezeMeta/utils/sqm2tables.py", line 60, in main total_reads, total_bases = parse_mappingstat(perlVars['$mappingstat']) File "/home/microbiomics/miniconda3/envs/SqueezeMeta_v1.4.0/SqueezeMeta/utils/../lib/utils.py", line 57, in parse_mappingstat for line in open(mappingstat): FileNotFoundError: [Errno 2] No such file or directory: 's12/results/10.s12.mappingstat' Project at s12/s12 is missing KEGG annotations, so they will be not included in the combined tables Project at s12/s12 is missing COG annotations, so they will be not included in the combined tables Project at s12/s12 is missing PFAM annotations, so they will be not included in the combined tables Traceback (most recent call last): File "/home/microbiomics/miniconda3/envs/SqueezeMeta_v1.4.0/bin/combine-sqm-tables.py", line 364, in main(parse_args()) File "/home/microbiomics/miniconda3/envs/SqueezeMeta_v1.4.0/bin/combine-sqm-tables.py", line 263, in main write_feature_dict(sampleNames, all_class, prefix + 'class.allfilter.abund.tsv') File "/home/microbiomics/miniconda3/envs/SqueezeMeta_v1.4.0/bin/combine-sqm-tables.py", line 344, in write_feature_dict df = df[sampleNames] File "/home/microbiomics/miniconda3/envs/SqueezeMeta_v1.4.0/lib/python3.6/site-packages/pandas/core/frame.py", line 2912, in getitem indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1] File "/home/microbiomics/miniconda3/envs/SqueezeMeta_v1.4.0/lib/python3.6/site-packages/pandas/core/indexing.py", line 1254, in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing) File "/home/microbiomics/miniconda3/envs/SqueezeMeta_v1.4.0/lib/python3.6/site-packages/pandas/core/indexing.py", line 1304, in _validate_read_indexer raise KeyError(f"{not_found} not in index") KeyError: "['s12'] not in index"

fpusan commented 3 years ago

It's a bit weird, the file s12/results/10.s12.mappingstat should be there in the previous versions too. Can you find it manually?

fpeti11 commented 3 years ago

There were a little mess in the files, that's why the program didn't find them. Thank you for your help I managed to solve this problem. I will always double check to update to the latest version.😀

I would have one more question: what is the difference between xx.nofilter, xx.allfilter, and xx.prokfilter in the results.

Thank you Peter

fpusan commented 3 years ago

Glad to hear it worked! As per your question, please check the the following entries in the PDF manual: