diff --git a/build.sh b/build.sh index b46031c..e158194 100755 --- a/build.sh +++ b/build.sh @@ -12,5 +12,5 @@ sed -e "s/\(date.*=\).*/\\1 \"$commitdate\"/" \ <$tmp >$f #sbt $* package sbt $* assembly -ln -sf `pwd`/target/scala-2.12/pilon-assembly-$version.jar ~/lib/pilon/pilon-dev.jar +#ln -sf `pwd`/target/scala-2.12/pilon-assembly-$version.jar ~/lib/pilon/pilon-dev.jar mv $tmp $f diff --git a/lib/htsjdk-2.14.3.jar b/lib/htsjdk-2.14.3.jar deleted file mode 100644 index e9b1537..0000000 Binary files a/lib/htsjdk-2.14.3.jar and /dev/null differ diff --git a/lib/htsjdk-2.21.2.jar b/lib/htsjdk-2.21.2.jar new file mode 100644 index 0000000..ab8533f Binary files /dev/null and b/lib/htsjdk-2.21.2.jar differ diff --git a/src/main/scala/org/broadinstitute/pilon/Pilon.scala b/src/main/scala/org/broadinstitute/pilon/Pilon.scala index f57a9a6..979d00e 100644 --- a/src/main/scala/org/broadinstitute/pilon/Pilon.scala +++ b/src/main/scala/org/broadinstitute/pilon/Pilon.scala @@ -20,6 +20,7 @@ package org.broadinstitute.pilon import java.io.File +import scala.io.Source object Pilon { // types of fixing we know about @@ -111,6 +112,12 @@ object Pilon { } + def addBamFile(filename: String, bamType: Symbol) { + for (line <- Source.fromFile(filename).getLines) { + bamFiles ::= new BamFile(new File(line), bamType) + } + } + def optionParse(list: List[String]) : Unit = { list match { case Nil => Nil @@ -125,6 +132,9 @@ object Pilon { case "--bam" :: value :: tail => bamFiles ::= new BamFile(new File(value), 'bam) optionParse(tail) + case "--bam-list" :: value :: tail => + addBamFile(value, 'bam) + optionParse(tail) case "--changes" :: tail => changes = true optionParse(tail) @@ -159,6 +169,9 @@ object Pilon { case "--frags" :: value :: tail => bamFiles ::= new BamFile(new File(value), 'frags) optionParse(tail) + case "--frags-list" :: value :: tail => + addBamFile(value, 'frags) + optionParse(tail) case "--gapmargin" :: value :: tail => gapMargin = value.toInt optionParse(tail) @@ -168,6 +181,9 @@ object Pilon { case "--jumps" :: value :: tail => bamFiles ::= new BamFile(new File(value), 'jumps) optionParse(tail) + case "--jumps-list" :: value :: tail => + addBamFile(value, 'jumps) + optionParse(tail) case "--K" :: value :: tail => Assembler.K = value.toInt optionParse(tail) @@ -223,6 +239,9 @@ object Pilon { case "--unpaired" :: value :: tail => bamFiles ::= new BamFile(new File(value), 'unpaired) optionParse(tail) + case "--unpaired-list" :: value :: tail => + addBamFile(value, 'frags) + optionParse(tail) case "--variant" :: tail => // variant calling mode vcf = true @@ -315,19 +334,27 @@ object Pilon { --frags frags.bam A bam file consisting of fragment paired-end alignments, aligned to the --genome argument using bwa or bowtie2. This argument may be specifed more than once. + --frags-list list.txt + A text file containing the paths to the fragment files one per line. This parameter + can be used instead of specifying --frags multiple times. --jumps jumps.bam A bam file consisting of jump (mate pair) paired-end alignments, aligned to the --genome argument using bwa or bowtie2. This argument may be specifed more than once. + --jumps-list list.txt + A text file containing the paths to the jump files one per line. This parameter + can be used instead of specifying --jumps multiple times. --unpaired unpaired.bam A bam file consisting of unpaired alignments, aligned to the --genome argument using bwa or bowtie2. This argument may be specifed more than once. + --unpaired-list list.txt + A text file containing the paths to the unpaired files one per line. This parameter + can be used instead of specifying --unpaired multiple times. --bam any.bam A bam file of unknown type; Pilon will scan it and attempt to classify it as one of the above bam types. - --nanopore ont.bam - A bam file containing Oxford Nanopore read alignments. Experimental. - --pacbio pb.bam - A bam file containing Pacific Biosciences read alignments. Experimental. + --bam-list list.txt + A text file containing the paths to the BAM files one per line. This parameter + can be used instead of specifying --bam multiple times. OUTPUTS: --output prefix Prefix for output files