Skip to content

Commit

Permalink
Merge pull request #156 from broadinstitute/ct-landscape-improvements
Browse files Browse the repository at this point in the history
Ct landscape improvements
  • Loading branch information
dpark01 committed Oct 5, 2015
2 parents 58b2917 + 0634897 commit 8ae0a4d
Show file tree
Hide file tree
Showing 32 changed files with 360 additions and 276 deletions.
5 changes: 5 additions & 0 deletions .pylintrc
@@ -0,0 +1,5 @@
# the default of five is a bit too restrictive
max-args = 12

# some sci computations require many local variables
max-locals = 20
6 changes: 4 additions & 2 deletions assembly.py
Expand Up @@ -372,7 +372,7 @@ def parser_impute_from_reference(parser=argparse.ArgumentParser()):

def refine_assembly(inFasta, inBam, outFasta,
outVcf=None, outBam=None, novo_params='', min_coverage=2,
chr_names=[], keep_all_reads=False, JVMmemory=None, threads=1):
chr_names=None, keep_all_reads=False, JVMmemory=None, threads=1):
''' This a refinement step where we take a crude assembly, align
all reads back to it, and modify the assembly to the majority
allele at each position based on read pileups.
Expand All @@ -383,6 +383,8 @@ def refine_assembly(inFasta, inBam, outFasta,
and realigned with GATK's IndelRealigner (in order to call indels).
Output FASTA file is indexed for Picard, Samtools, and Novoalign.
'''
chr_names = chr_names or []

# Get tools
picard_index = tools.picard.CreateSequenceDictionaryTool()
picard_mkdup = tools.picard.MarkDuplicatesTool()
Expand Down Expand Up @@ -840,7 +842,7 @@ def vcfrow_parse_and_call_snps(vcfrow, samples, min_dp=0, major_cutoff=0.5, min_
geno = [allele_depths[0][1]]
else:
# call multiple alleles at this position if there is no clear winner
geno = [a for n, a in allele_depths]
geno = [a for _, a in allele_depths]
if geno:
yield (c, start, stop, sample, geno)

Expand Down

0 comments on commit 8ae0a4d

Please sign in to comment.