From 0d53586426bfce1a9062d8e0664d4a6358db985c Mon Sep 17 00:00:00 2001 From: Michael L Heuer Date: Wed, 28 Apr 2021 15:57:21 -0500 Subject: [PATCH] Add paired fastq argument to transformFragments. --- .../org/bdgenomics/adam/cli/TransformFragments.scala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/adam-cli/src/main/scala/org/bdgenomics/adam/cli/TransformFragments.scala b/adam-cli/src/main/scala/org/bdgenomics/adam/cli/TransformFragments.scala index fdacb166a0..7ad053c7ee 100644 --- a/adam-cli/src/main/scala/org/bdgenomics/adam/cli/TransformFragments.scala +++ b/adam-cli/src/main/scala/org/bdgenomics/adam/cli/TransformFragments.scala @@ -47,6 +47,9 @@ class TransformFragmentsArgs extends Args4jBase with ADAMSaveAnyArgs with Parque @Args4jOption(required = false, name = "-load_as_alignments", usage = "Treats the input data as alignments") var loadAsAlignments: Boolean = false + @Args4jOption(required = false, name = "-paired_fastq", usage = "When converting two (paired) FASTQ files, pass the path to the second file here.") + var pairedFastqFile: String = null + @Args4jOption(required = false, name = "-save_as_alignments", usage = "Saves the output data as alignments") var saveAsAlignments: Boolean = false @@ -130,8 +133,9 @@ class TransformFragments(protected val args: TransformFragmentsArgs) extends BDG args.configureCramFormat(sc) - val rdd = if (args.loadAsAlignments) { - sc.loadAlignments(args.inputPath) + val optPairedFastqFile = Option(args.pairedFastqFile) + val rdd = if (args.loadAsAlignments || optPairedFastqFile.isDefined) { + sc.loadAlignments(args.inputPath, optPathName2 = optPairedFastqFile) .toFragments } else { sc.loadFragments(args.inputPath)