Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MergeSamFiles accept SO:UNKNOWN #796

Closed
MichelMoser opened this issue Apr 20, 2017 · 1 comment
Closed

MergeSamFiles accept SO:UNKNOWN #796

MichelMoser opened this issue Apr 20, 2017 · 1 comment

Comments

@MichelMoser
Copy link

Bug Report

Affected tool(s)

MergeSamFiles

Affected version(s)

picard2.9.0.jar

Description

IAim is to merge bam files from BLASR alignment which carry the header:
@hd VN:1.5 SO:UNKNOWN pb:3.0.1

right now, this produces the error:

Steps to reproduce

java -jar /home/mmoser/picard2.9.0.jar MergeSamFiles I=10_aligned.bam.bam I=11_aligned.bam.bam I=12_aligned.bam.bam I=13_aligned.bam.bam I=14_aligned.bam.bam I=15_aligned.bam.bam I=16_aligned.bam.bam I=17_aligned.bam.bam I=18_aligned.bam.bam I=19_aligned.bam.bam I=1_aligned.bam.bam I=20_aligned.bam.bam I=21_aligned.bam.bam I=22_aligned.bam.bam O=/data7/users/tural/50smrtcell_sorted.bam VALIDATION_STRINGENCY=SILENT MAX_RECORDS_IN_RAM=50000 TMP_DIR=/data7/users/tural USE_THREADING=true

Expected behavior

Ignore the SO: in the input files and sort them according to coordinates when merging the files.

Actual behavior

Throws error:

Exception in thread "main" java.lang.IllegalArgumentException: No enum constant htsjdk.samtools.SAMFileHeader.SortOrder.UNKNOWN
        at java.lang.Enum.valueOf(Enum.java:238)
        at htsjdk.samtools.SAMFileHeader$SortOrder.valueOf(SAMFileHeader.java:66)
        at htsjdk.samtools.SAMFileHeader.getSortOrder(SAMFileHeader.java:255)
        at picard.sam.MergeSamFiles.doWork(MergeSamFiles.java:161)
        at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:205)
        at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:94)
        at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:104)

Of course, there is a solution of just rewriting the BAM-header but as this is quite timeconsuming for large BAM-files, i wondered if there is an option to ignore the SO value of input files when merging.

Thank you,
Michel

@yfarjoun
Copy link
Contributor

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants