Permalink
Browse files

Additional bowtie2 integration

  • Loading branch information...
chapmanb committed Nov 22, 2011
1 parent 642eab2 commit 0f46c26ffe3b40a41dbd43596d68d89b1b55be26
Showing with 4 additions and 4 deletions.
  1. +1 −1 nextgen/bcbio/broad/picardrun.py
  2. +1 −1 nextgen/bcbio/ngsalign/bowtie2.py
  3. +2 −2 nextgen/bcbio/pipeline/alignment.py
@@ -67,7 +67,7 @@ def picard_fastq_to_bam(picard, fastq_one, fastq_two, out_dir,
qual_format = qual_formats[platform.lower()]
except KeyError:
raise ValueError("Need to specify quality format for %s" % platform)
- out_bam = os.path.join(out_dir, "%s.bam" %
+ out_bam = os.path.join(out_dir, "%s-fastq.bam" %
os.path.splitext(os.path.basename(fastq_one))[0])
if not file_exists(out_bam):
with curdir_tmpdir() as tmp_dir:
@@ -14,7 +14,7 @@
def _bowtie2_args_from_config(config):
"""Configurable high level options for bowtie2.
"""
- qual_format = config["algorithm"].get("quality_format", None)
+ qual_format = config["algorithm"].get("quality_format", "")
if qual_format.lower() == "illumina":
qual_flags = ["--phred64-quals"]
else:
@@ -37,7 +37,7 @@ def align_to_sort_bam(fastq1, fastq2, genome_build, aligner,
align_ref, sam_ref = get_genome_ref(genome_build, aligner, dirs["galaxy"])
align_fn = _tools[aligner].align_fn
sam_file = align_fn(fastq1, fastq2, align_ref, lane_name, dirs["align"], config)
- if fastq2 is None and aligner in ["bwa"]:
+ if fastq2 is None and aligner in ["bwa", "bowtie2"]:
fastq1 = _remove_read_number(fastq1, sam_file)
return sam_to_sort_bam(sam_file, sam_ref, fastq1, fastq2, sample_name,
lane_name, config)
@@ -89,7 +89,7 @@ def sam_to_sort_bam(sam_file, ref_file, fastq1, fastq2, sample_name,
utils.save_diskspace(out_fastq_bam, "Combined into output BAM %s" % out_bam, config)
utils.save_diskspace(out_bam, "Sorted to %s" % sort_bam, config)
# merge FASTQ files, only if barcoded samples in the work directory
- if (os.path.commonprefix([fastq1, sort_bam]) == os.path.dirname(sort_bam) and
+ if (os.path.commonprefix([fastq1, sort_bam]).startswith(os.path.dirname(sort_bam)) and
not config["algorithm"].get("upload_fastq", True)):
utils.save_diskspace(fastq1, "Merged into output BAM %s" % out_bam, config)
if fastq2:

0 comments on commit 0f46c26

Please sign in to comment.