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

New htsjdk and options *-list #117

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Binary file removed lib/htsjdk-2.14.3.jar
Binary file not shown.
Binary file added lib/htsjdk-2.21.2.jar
Binary file not shown.
35 changes: 31 additions & 4 deletions src/main/scala/org/broadinstitute/pilon/Pilon.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package org.broadinstitute.pilon

import java.io.File
import scala.io.Source

object Pilon {
// types of fixing we know about
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down