SqueezeMeta icon indicating copy to clipboard operation
SqueezeMeta copied to clipboard

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

Open biobrad opened this issue 3 years ago • 8 comments

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

biobrad avatar Jan 20 '22 08:01 biobrad

Great, thanks for compiling this! :)

fpusan avatar Jan 20 '22 09:01 fpusan

Thank you for squeezemeta! You have done a lot for the research community!

On Thu, 20 Jan 2022, 8:20 pm Fernando Puente-Sánchez, < @.***> wrote:

Great, thanks for compiling this! :)

— Reply to this email directly, view it on GitHub https://github.com/jtamames/SqueezeMeta/issues/416#issuecomment-1017296144, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANITBGQ43UUTSAWJ2AE56MTUW7LHLANCNFSM5MMC6X5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

biobrad avatar Jan 20 '22 09:01 biobrad

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 avatar Jun 16 '22 07:06 fpusan

... 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!)

fpusan avatar Jun 15 '23 14:06 fpusan

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!

srz11d avatar Sep 06 '23 15:09 srz11d

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

fpusan avatar Sep 07 '23 06:09 fpusan

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?

srz11d avatar Sep 07 '23 11:09 srz11d

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

fpusan avatar Sep 07 '23 11:09 fpusan