picard CreateSequenceDictionary complains about a contig being defined 2x
0
0
Entering edit mode
8.9 years ago
modockesner ▴ 10

Here is the call

java -jar /source/picard-tools-1.102/picard-tools-1.102/CreateSequenceDictionary.jar REFERENCE=mm_ref.fa OUTPUT=mm_ref.dict

Error:

java -jar /source/picard-tools-1.84/picard-tools-1.84/CreateSequenceDictionary.jar REFERENCE=${PWD}/mm_ref.fa OUTPUT=${PWD}/mm_ref.dict
[Mon Jan 11 17:36:29 EST 2016] net.sf.picard.sam.CreateSequenceDictionary REFERENCE=/data/leelab/projects/common/mtrDmm10/mm_ref.fa OUTPUT=/data/leelab/projects/common/mtrDmm10/mm_ref.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 Jan 11 17:36:29 EST 2016] Executing as bak22@eris1n3.research.partners.org on Linux 2.6.32-431.29.2.el6.x86_64 amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_45-b14; Picard version: 1.84(1332)
[Mon Jan 11 17:36:29 EST 2016] net.sf.picard.sam.CreateSequenceDictionary done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=514850816
FAQ:  http://sourceforge.net/apps/mediawiki/picard/index.php?title=Main_Page
Exception in thread "main" net.sf.picard.PicardException: Contig 'rDNA' 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:95)
    at net.sf.picard.reference.ReferenceSequenceFileFactory.getReferenceSequenceFile(ReferenceSequenceFileFactory.java:75)
    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:177)
    at net.sf.picard.sam.CreateSequenceDictionary.main(CreateSequenceDictionary.java:93)

I don't see a contig 2x

bak22@eris1n3 mtrDmm10]$ cat mm_ref.fa | awk '$1 ~ ">"{print $0}'
>chr1
>chr10
>chr11
>chr12
>chr13
>chr14
>chr15
>chr16
>chr17
>chr18
>chr19
>chr2
>chr3
>chr4
>chr5
>chr6
>chr7
>chr8
>chr9
>chrX
>chrY
>mtDNA
>rDNA
>GL456210.1
>GL456211.1
>GL456212.1
>GL456213.1
>GL456216.1
>GL456219.1
>GL456221.1
>GL456233.1
>GL456239.1
>GL456350.1
>GL456354.1
>GL456359.1
>GL456360.1
>GL456366.1
>GL456367.1
>GL456368.1
>GL456370.1
>GL456372.1
>GL456378.1
>GL456379.1
>GL456381.1
>GL456382.1
>GL456383.1
>GL456385.1
>GL456387.1
>GL456389.1
>GL456390.1
>GL456392.1
>GL456393.1
>GL456394.1
>GL456396.1
>JH584292.1
>JH584293.1
>JH584294.1
>JH584295.1
>JH584296.1
>JH584297.1

Newer versions give same result(1,102)

software-error CreateSequenceDictionary picard • 3.4k views
ADD COMMENT
0
Entering edit mode

You are grepping the fasta file, but what about the fasta index itself? The error states:

Contig 'rDNA' already exists in fasta index.​

Perhaps try re-indexing your reference?

ADD REPLY
0
Entering edit mode

Yes you are correct. rDNA was in the mm_ref.fai 2x. Not sure how. Removing one fixed this problem.

Thanks so much!

ADD REPLY

Login before adding your answer.

Traffic: 2628 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6