This is a test version of Biostars. For the public version, visit https://www.biostars.org.
problem to create reference.dict with CreateSequenceDictionary.jar

Hi,

Please can anyone help me?

I want to recreate reference.dict (because I deleted the first file) with this command:

java -jar CreateSequenceDictionary.jar REFERENCE=hg19.fa OUTPUT=hg19.dict

But I have this

[Mon May 19 12:49:23 CET 2014] net.sf.picard.sam.CreateSequenceDictionary REFERENCE=hg19.fa OUTPUT=hg19.dict    TRUNCATE_NAMES_AT_WHITESPACE=true NUM_SEQUENCES=2147483647 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false
[Mon May 19 12:49:23 CET 2014] Executing as yosrabouyacoub@MacBook-Pro-de-Yosra.local on Mac OS X 10.8.5 x86_64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_05-b13; Picard version: 1.113(1962) JdkDeflater
[Mon May 19 12:49:24 CET 2014] net.sf.picard.sam.CreateSequenceDictionary done. Elapsed time: 0,01 minutes.
Runtime.totalMemory()=135266304
To get help, see http://picard.sourceforge.net/index.shtml#GettingHelp
Exception in thread "main" net.sf.picard.PicardException: Contig 'chr21' already exists in fasta index.
    at net.sf.picard.reference.FastaSequenceIndex.add(FastaSequenceIndex.java:70)
    at net.sf.picard.reference.FastaSequenceIndex.parseIndexFile(FastaSequenceIndex.java:142)
    at net.sf.picard.reference.FastaSequenceIndex.<init>(FastaSequenceIndex.java:55)
    at net.sf.picard.reference.IndexedFastaSequenceFile.<init>(IndexedFastaSequenceFile.java:92)
    at net.sf.picard.reference.ReferenceSequenceFileFactory.getReferenceSequenceFile(ReferenceSequenceFileFactory.java:77)
    at net.sf.picard.sam.CreateSequenceDictionary.makeSequenceDictionary(CreateSequenceDictionary.java:132)
    at net.sf.picard.sam.CreateSequenceDictionary.doWork(CreateSequenceDictionary.java:117)
    at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:179)
    at net.sf.picard.sam.CreateSequenceDictionary.main(CreateSequenceDictionary.java:93)

and no .dict file was created!

Thanks a lot in advance for your help!

picard next-gen

can you please show us the ouput of grep ">" hg19.fa

Thanks,

MacBook-Pro-de-Yosra:fastq yosrabouyacoub$ grep ">" hg19.fa
>chr1
>chr2
>chr3
>chr4
>chr5
>chr6
>chr7
>chr8
>chr9
>chr10
>chr11
>chr12
>chr13
>chr14
>chr15
>chr16
>chr17
>chr18
>chr19
>chr20
>chr21
>chr21
>chr22
>chrX
>chrY
>chrM

2 answers

as you see, the chr21 is defined twice.

You cannot create an index with this file.

Thanks,

MacBook-Pro-de-Yosra:fastq yosrabouyacoub$ grep ">" hg19.fa
>chr1
>chr2
>chr3
>chr4
>chr5
>chr6
>chr7
>chr8
>chr9
>chr10
>chr11
>chr12
>chr13
>chr14
>chr15
>chr16
>chr17
>chr18
>chr19
>chr20
>chr21
>chr21
>chr22
>chrX
>chrY
>chrM

Log in to answer this question.