sstacks unable to parse catalog

156 views
Skip to first unread message

Emma

unread,
Apr 23, 2020, 5:33:55 PM4/23/20
to Stacks
Hi,

I have successfully run stacks on several datasets and was now attempting to use sstacks to genotype new samples using the existing catalog, but have run into a problem reading the catalog. 

I used the example per-sample code in the sstacks website modified for the computer cluster I use:

module load Stacks/2.41-gimkl-2018b

samplename=$1

sstacks -c /nesi/nobackup/uoa02626/TruesBW/belugastacks \
-s /nesi/nobackup/uoa02626/bw_ddrad/srw_gen/sort/${s} \
-o /nesi/nobackup/uoa02626/bw_ddrad/srw_gen/catalogued/ -p 6

But get the following error:

Unable to open '/nesi/nobackup/uoa02626/TruesBW/belugastacks/catalog'
Error: Unable to parse catalog, '/nesi/nobackup/uoa02626/TruesBW/belugastacks/ca
talog'
Aborted

the directory is correct, it is where the original gstacks command outputted its files to.
 following files are located in /nesi/nobackup/uoa02626/TruesBW/belugastacks/
catalog.calls                 
catalog.fa.gz 
various populations.x files

the same version of stacks is being used for this command that was used to build the catalog.

I have tried (1) moving catalog files into a folder called 'catalog'; and (2) running sstacks with a more recent version of the stacks program (Stacks/2.52-gimkl-2020a), but these attempts failed too.

Any suggestions on how to successfully run sstacks would be appreciated.

thanks
Emma




Julian Catchen

unread,
Apr 23, 2020, 5:48:00 PM4/23/20
to stacks...@googlegroups.com, Emma
Hi,

Where are the files that are output by cstacks?

catalog.tags.tsv.gz
catalog.snps.tsv.gz
catalog.alleles.tsv.gz

sstacks relies on the initial catalog generated by cstacks.

julian

Emma wrote on 4/23/20 4:33 PM:

Emma

unread,
Apr 23, 2020, 7:06:06 PM4/23/20
to Stacks
Hi Julian,

thanks for getting back to me so quickly.

OK, so the catalog was created by gstacks, because I am using a reference. I see now that sstacks is only compatible with catalogs created by cstacks. 

So I have to rerun gstacks with the 200 new samples, and come up with a new catalogue? 

Then I have to cross reference the new catalog against the old one, I guess, which is doable with the reference scaffold number and position.

cheers
Emma

Bud Freeman

unread,
Jan 29, 2024, 11:49:17 PM1/29/24
to Stacks

Greetings-- I've complied Stacks to run on an M2 Mac laptop-- using a test set of 26 paired samples- ustacks and cstacks execute well however I am getting this "unable to parse catalog error". The catalogs are in the same folder as the output from cstacks -- Stacks9-- below-- The Dropbox Folder is LOCAL and offline, so no writing problems. 


Thanks for suggestions and help, and would be glad to know it is a obvious beginner's error :-)


Bud Freeman, UGA



Specs: M2Max, 96gb Osx 14.2 Stacks v 2.64


 Percina % sh CSstacks.sh

Searching for matches by sequence identity...

 Unable to open '$/Users/bud/Dropbox/Percina/Stacks9/catalog'

Error: Unable to parse catalog, '$/Users/bud/Dropbox/Percina/Stacks9/catalog'

terminate called after throwing an instance of 'std::exception'

  what():  std::exception

CSstacks.sh: line 41:  4732 Abort trap: 6           sstacks -P $/Users/bud/Dropbox/Percina/Stacks9 -M /Users/bud/Dropbox/Percina/Perc_population_map_p9.txt -p 12

Catchen, Julian

unread,
Jan 30, 2024, 3:15:34 PM1/30/24
to stacks...@googlegroups.com

Hi,

 

I am unsure why you have a ‘$’ in your path to the stacks directory in your sstacks command, but as the program says, “Unable to open '$/Users/bud/Dropbox/Percina/Stacks9/catalog'” , it is unable to open the path, which seems to begin with ‘$’ (of course, ‘$’ is usually used as the command line prompt in the shell, so maybe you inadvertently included it in your sstacks path?).

 

julian

Bud Freeman

unread,
Jan 31, 2024, 11:00:50 AM1/31/24
to Stacks
Thanks Julian-- indeed an operator error on my part :-) -- that was an easy fix and it worked!!!

Bud
Reply all
Reply to author
Forward
0 new messages