Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqm2tables.py - All fixes in one place :-) #416

Open
biobrad opened this issue Jan 20, 2022 · 8 comments
Open

sqm2tables.py - All fixes in one place :-) #416

biobrad opened this issue Jan 20, 2022 · 8 comments
Labels

Comments

@biobrad
Copy link

biobrad commented Jan 20, 2022

Not an issue - i had a couple of problems and found this data in separate places. Adding here for the next person who needs it.

If you have run SqueezeMeta on a HPC and are now working with the results locally...

Fix SqueezeMeta sqm2tables.py issue:

In the file in the analysis folder - SqueezeMeta_conf.pl - Change path to results folder and db to match your install and db locations
$installpath = "/home/harbj019/miniconda3/envs/newsqueezemeta/SqueezeMeta";
$databasepath = "/home/harbj019/dbs/db";

If you have upgraded your SqueezeMeta Install to a later version (after 1.2) and want to work with
data from a version 1.2 or earlier:

Fix SqueezeMeta sqm2tables.py issue:

In the file in the analysis folder - SqueezeMeta_conf.pl -

below line 55 add:
$mappingstat = "$resultpath/10.$projectname.mappingstat";

Run step 9 again (perl 09.summarycontigs3.pl /path/to/your/project). (use full path)
Remove the /path/to/your/project/results/tables, if present.

Save and run sqm2tables again.
sqm2tables.py /<project> /<projectname>/table

@fpusan
Copy link
Collaborator

fpusan commented Jan 20, 2022

Great, thanks for compiling this! :)

@biobrad
Copy link
Author

biobrad commented Jan 20, 2022 via email

@fpusan
Copy link
Collaborator

fpusan commented Jun 16, 2022

If you are trying to run SQMtools (loadSQM in particular) in Windows without having run sqm2tables.py in your Linux computer, the command will fail complaining about sqm2tables.py.

If this is the case, make sure you run sqm2tables.py in your Linux environment before migrating the data to Windows, with
sqm2tables.py /path/to/project/ /path/to/project/results/tables

Find more details in
https://github.com/jtamames/SqueezeMeta/wiki/Using-SQMtools-in-a-Windows-environment

@fpusan
Copy link
Collaborator

fpusan commented Jun 15, 2023

... and note that you also have sqm2zip.py to easily transfer your project to a different machine.
Also installing SQMtools has become much easier in Windows and Mac (see ReadMe!)

@srz11d
Copy link

srz11d commented Sep 6, 2023

Hello,
I am having issues with loading my files too.

I have my files in 10 separate folders (10 samples), every folder contains the following files:

Screenshot 2023-09-06 at 15 57 34

I tried to load the files in RStudio but I seemed to fail:
I read other comments and I tried:

library('SQMtools')
Indoor1 = loadSQM('/Users/user/Documents/SQM_Ponds1')

But then I got:

Error in loadSQM("/Users/user/Documents/SQM_Ponds1") : 
  Directory "/Users/user/Documents/SQM_Ponds1" does not seem to contain a valid SqueezeMeta project

Are there any missing files?

Thanks!

@fpusan
Copy link
Collaborator

fpusan commented Sep 7, 2023

did you rename your SqueezeMeta_conf.pl files?
I see one of them is named SqueezeMeta_conf_Indoor1.pl

@srz11d
Copy link

srz11d commented Sep 7, 2023

I did change the name to identify the samples, but after reading other comments, I decided to load every single folder. The folder results contains a folder named tables. I haven't changed any tables or files, the format looks like this (for each file):
Screenshot 2023-09-07 at 12 01 59

I ran:
Outdoor2 = loadSQM('/Volumes/Intenso/Hazda/Outdoor.2')

and I got:

Outdoor2 = loadSQM('/Volumes/Intenso/Hazda/Outdoor.2')
Loading total reads
Loading orfs
table...
|--------------------------------------------------|
|==================================================|
abundances...
sequences...
taxonomy...
Loading contigs
table...
abundances...
Error in dimnames(x) <- dn :
length of 'dimnames' [1] not equal to array extent
In addition: Warning message:
In loadSQM("/Volumes/Intenso/Hazda/Outdoor.2") :
Your project was created with SqueezeMeta v1.5, while this is SQMtools v1.6.2. You can ignore this message if things are working fine for you, but if you experience any issue consider using the right version of SQMtools for this project

Could the version of SQM be the reason my files are not processed?

@fpusan
Copy link
Collaborator

fpusan commented Sep 7, 2023

yes, you should be using the SQMtools version that was shipped with SqueezeMeta v1.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants