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

Save as CRAM precondition incorrectly fails on sorted Parquet input #2214

Open
heuermh opened this issue Sep 25, 2019 · 0 comments
Open

Save as CRAM precondition incorrectly fails on sorted Parquet input #2214

heuermh opened this issue Sep 25, 2019 · 0 comments

Comments

@heuermh
Copy link
Member

heuermh commented Sep 25, 2019

$ adam-submit transformAlignments \
  -sort_by_reference_position_and_index \
  NA12878.alignedHg38.duplicateMarked.baseRealigned.bam \
  NA12878.alignedHg38.duplicateMarked.baseRealigned.alignments.adam

$ INPUT=NA12878.alignedHg38.duplicateMarked.baseRealigned.alignments.adam \
  OUTPUT=NA12878.alignedHg38.duplicateMarked.baseRealigned.out.cram \
  adam-shell -i convert_parquet_alignments_adam_dataset.scala
...
java.lang.IllegalArgumentException: requirement failed: To save as CRAM, input must be sorted.
  at scala.Predef$.require(Predef.scala:224)
  at org.bdgenomics.adam.rdd.read.AlignmentRecordDataset$$anonfun$saveAsSam$2.apply(AlignmentRecordDataset.scala:896)
  at scala.Option.fold(Option.scala:158)
  at org.apache.spark.rdd.Timer.time(Timer.scala:48)
  at org.bdgenomics.adam.rdd.read.AlignmentRecordDataset.saveAsSam(AlignmentRecordDataset.scala:832)
  at org.bdgenomics.adam.rdd.read.AlignmentRecordDataset$$anonfun$saveAsSam$1.apply$mcV$sp(AlignmentRecordDataset.scala:823)
  at org.bdgenomics.adam.rdd.read.AlignmentRecordDataset$$anonfun$saveAsSam$1.apply(AlignmentRecordDataset.scala:823)
  at org.bdgenomics.adam.rdd.read.AlignmentRecordDataset$$anonfun$saveAsSam$1.apply(AlignmentRecordDataset.scala:823)
  at scala.Option.fold(Option.scala:158)
  at org.apache.spark.rdd.Timer.time(Timer.scala:48)
  at org.bdgenomics.adam.rdd.read.AlignmentRecordDataset.saveAsSam(AlignmentRecordDataset.scala:822)
  ... 65 elided

See convert_parquet_alignments_adam_dataset.scala

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

1 participant