jtamames/SqueezeMeta

sqm2tables.py

Closed this issue · 9 comments

Dear sir,

I want to use sqm2tables.py to aggregate the abundance of ORFs... But there still some error happened.
sqm2tables.py /lustre/BIF/nobackup/sun091/metagenome/subset_6/A9 "/lustre/BIF/nobackup/sun091/metagenome/6_others_squeeze/output/A9/"

Traceback (most recent call last):
File "/lustre/BIF/nobackup/sun091/miniforge3/envs/SqueezeMeta/bin/sqm2tables.py", line 223, in
main(parse_args())
File "/lustre/BIF/nobackup/sun091/miniforge3/envs/SqueezeMeta/bin/sqm2tables.py", line 41, in main
perlVars = parse_conf_file(args.project_path, override = {'$projectdir': args.project_path})
File "/lustre/BIF/nobackup/sun091/miniforge3/envs/SqueezeMeta/SqueezeMeta/utils/../lib/utils.py", line 22, in parse_conf_file
for line in open('{}/SqueezeMeta_conf.pl'.format(project_path)):
FileNotFoundError: [Errno 2] No such file or directory: '/lustre/BIF/nobackup/sun091/metagenome/subset_6/A9/SqueezeMeta_conf.pl'

Is /lustre/BIF/nobackup/sun091/metagenome/subset_6/A9/ a path to a SqueezeMeta project? Or did you maybe get this using sqm_reads.pl or sqm_longreads.pl.
What's the output of ls /lustre/BIF/nobackup/sun091/metagenome/subset_6/A9/?

Ok, if it worked maybe there was some issue with the server before... let me know if the issue reappears

Is /lustre/BIF/nobackup/sun091/metagenome/subset_6/A9/ a path to a SqueezeMeta project? Or did you maybe get this using sqm_reads.pl or sqm_longreads.pl. What's the output of ls /lustre/BIF/nobackup/sun091/metagenome/subset_6/A9/?

Hi @fpusan , I have generated my data using sqm_reads.pl. can I still use sqm2zip.py to move my data to R for the downstream analysis. if not, can you clarify the steps to do so? thank you!

Hi,

  • You first need to run the sqmreads2tables.py script on the output directory from sqm_reads.pl. Note that at this step you can also filter the data to select certain taxa or functions (but since this is a "reads" project you will not be able to do it later in R).
  • The script will generate an output directory with tables. This is what you will need for downstream analysis. You can move it to a different computer or analyze it in place.
  • To load it in SQMtools, use SQM=loadSQMlite("/path/to/output/tables")

Hi @fpusan thank you for the detailed workaround for my situation.
i will run my data accordingly and reach out if I have any other further questions.
thank you!

hi @fpusan, we discovered that sqmreads2tables.py will only run on a single directory.
in our case, since we have ~400 samples, hence we split the samples as 4 samples per directory when we run sqm_reads.pl to cut down the processing time needed.
and we used combine-sqm-tables.py to pull the analysis outcomes together. we hope to use R for the downstream analyses, but sqmreads2tables.py doesn't seem to take the results from combine-sqm-tables.py.

we are not sure if there is a better way to process our samples.
how would you recommend us to run our data and still give us the benefit of using R for our analysis?

Yes, this is correct. The alternative would be to load the tables for each project separately into R with loadSQMlite and the merge them with combineSQMlite. The outcome should be the same.