cstacks popmap error

35 views
Skip to first unread message

Jodie Freeborn

unread,
Nov 28, 2022, 7:50:59 AM11/28/22
to Stacks
Good Afternoon, 

I am trying to run the denovo pipeline by hand but cannot input my popmap file successfully.
I have tried making serval different files, typing by hand and checking for hidden characters but keep getting the same error:

Error: Failed to parse command line: '/mnt/scratch2/GROUP-sbipao/sbijf6/work/7_denovo/popMap3.txt' is seen as a positional argument. Expected no positional arguments.

Could you please help troubleshoot?
Thanks,
Jodie

The part of my script is as follows:
.......
threads=20
workDir=/mnt/scratch2/GROUP-sbipao/sbijf6/work/7_denovo
process_radtagsDir=/mnt/scratch2/GROUP-sbipao/sbijf6/work/6_extract_birdreads/FASTQ_extracted_birds
log=${workDir}/log_denovo.txt
popMap=${workDir}/popMap3.txt
.........

cstacks -P ${denovoDir} -M ${popMap} -n 2 -p ${threads}

 #echo "Step 2_3) sstacks: Match sets of stacks (ie putative loci) from ustacks against the catalog produced by cstacks " >> $log
   ## -P directory containing files generated by ustacks and cstacks; -M population map; -p threads; -o output directory

sstacks -P ${denovoDir} -M ${popMap} -p ${threads}

 #echo "Step 2_4) tsv2bam: Transpose data so that it is orientated by locus instead of by sample; pull in the set of paired-end reads that are associated with each single-end locus that was assembled de novo " >> $log
  
tsv2bam -P ${denovoDir} -M ${popMap} -R ${process_radtagsDir} -t 8


My popMap fiile is:
8221952    Kirkijiev
8221958    Kirkijiev
8146878    Hojmosejev
8146879    Hojmosejev
8146880    Hojmosejev
8146873    Hojmosejev
8146883    Hojmosejev
8146884    Hojmosejev
8146886    Hojmosejev
8146888    Hojmosejev
8146889    Hojmosejev
........ ect


Catchen, Julian

unread,
Nov 28, 2022, 10:07:26 AM11/28/22
to stacks...@googlegroups.com

Hi Jodie,

 

The variable ${denovoDir} is not defined in your script causing the -P option to take ‘-M’ as its argument and then for ${popMap} to be left hanging with no specified option.

 

You could run denovo_map.pl --dry-run to get the individual commands you want to execute (though it won’t fix shell variables).

 

julian

Reply all
Reply to author
Forward
0 new messages