使用picard对参考序列建索引时报错“java.lang.IllegalArgumentException: File is not a supported reference file type”

报错:Caused by: java.lang.IllegalArgumentException: File is not a supported reference file type

运行创建索引的命令:

java -jar /share/work/biosoft/picard/picard.jar  CreateSequenceDictionary --REFERENCE Bromus_tectorum.faa --OUTPUT Bromus_tectorum.dict

报错:

10:13:20.679 INFO  NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/share/work/biosoft/picard/picard-3.0.0/picard.jar!/com/intel/gkl/native/libgkl_compression.so
[Fri Oct 13 10:13:20 CST 2023] CreateSequenceDictionary --OUTPUT Bromus_tectorum.dict --REFERENCE Bromus_tectorum.faa --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 --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false
[Fri Oct 13 10:13:20 CST 2023] Executing as process@cluster.rocks.org on Linux 3.10.0-693.5.2.el7.x86_64 amd64; Java HotSpot(TM) 64-Bit Server VM 19.0.1+10-21; Deflater: Intel; Inflater: Intel; Provider GCS is not available; Picard version: Version:3.0.0
[Fri Oct 13 10:13:20 CST 2023] picard.sam.CreateSequenceDictionary done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=2147483648
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" picard.PicardException: Unknown problem. Partial dictionary file was deleted.
        at picard.sam.CreateSequenceDictionary.doWork(CreateSequenceDictionary.java:253)
        at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:289)
        at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:104)
        at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:114)
Caused by: java.lang.IllegalArgumentException: File is not a supported reference file type: Bromus_tectorum.faa
        at htsjdk.samtools.reference.ReferenceSequenceFileFactory.lambda$getFastaExtension$0(ReferenceSequenceFileFactory.java:253)
        at java.base/java.util.Optional.orElseGet(Optional.java:364)
        at htsjdk.samtools.reference.ReferenceSequenceFileFactory.getFastaExtension(ReferenceSequenceFileFactory.java:253)
        at htsjdk.samtools.reference.ReferenceSequenceFileFactory.getReferenceSequenceFile(ReferenceSequenceFileFactory.java:135)
        at htsjdk.samtools.reference.ReferenceSequenceFileFactory.getReferenceSequenceFile(ReferenceSequenceFileFactory.java:100)
        at htsjdk.samtools.reference.ReferenceSequenceFileFactory.getReferenceSequenceFile(ReferenceSequenceFileFactory.java:88)
        at picard.util.SequenceDictionaryUtils$SamSequenceRecordsIterator.<init>(SequenceDictionaryUtils.java:82)
        at picard.sam.CreateSequenceDictionary.lambda$getSamSequenceRecordsIterable$0(CreateSequenceDictionary.java:169)
        at picard.sam.CreateSequenceDictionary.doWork(CreateSequenceDictionary.java:234)
        ... 3 more

解决问题:

报错原因已经提示,就是参考序列文件格式不支持。但文件内容很正常,最后发现是参考序列文件后缀的问题。将.faa后缀改为.fa后缀就解决了。

10:31:43.112 INFO  NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/share/work/biosoft/picard/picard-3.0.0/picard.jar!/com/intel/gkl/native/libgkl_compression.so
[Fri Oct 13 10:31:43 CST 2023] CreateSequenceDictionary --OUTPUT Bromus_tectorum.dict --REFERENCE Bromus_tectorum.fa --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 --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false
[Fri Oct 13 10:31:43 CST 2023] Executing as process@cluster.rocks.org on Linux 3.10.0-693.5.2.el7.x86_64 amd64; Java HotSpot(TM) 64-Bit Server VM 19.0.1+10-21; Deflater: Intel; Inflater: Intel; Provider GCS is not available; Picard version: Version:3.0.0
[Fri Oct 13 10:32:02 CST 2023] picard.sam.CreateSequenceDictionary done. Elapsed time: 0.33 minutes.
Runtime.totalMemory()=2432696320

  • 发表于 2023-10-13 10:53
  • 阅读 ( 1010 )
  • 分类:软件工具

0 条评论

请先 登录 后评论
rzx
rzx

78 篇文章

作家榜 »

  1. omicsgene 702 文章
  2. 安生水 351 文章
  3. Daitoue 167 文章
  4. 生物女学霸 120 文章
  5. xun 82 文章
  6. rzx 78 文章
  7. 红橙子 78 文章
  8. CORNERSTONE 72 文章