Skip to content

Commit

Permalink
v0.3.7 should fix termini
Browse files Browse the repository at this point in the history
  • Loading branch information
caleblareau committed May 21, 2018
1 parent b6d9b97 commit 925bd12
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Pypkg/mgatk/mgatk/bin/python/filterClipBam.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

keepCount = 0
filtCount = 0
#proper_pair = "False"

def filterReadTags(intags):
'''
Expand All @@ -49,7 +50,6 @@ def pairing(read):
def processRead(read):
global keepCount
global filtCount

if(filterReadTags(read.tags) and read.reference_name == mtchr and pairing(read)):
keepCount += 1
out.write(read)
Expand Down
1 change: 1 addition & 0 deletions Pypkg/mgatk/mgatk/bin/python/sumstatsBP.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def writeSparseMatrix2(mid, vec1, vec2):
V.write(str(i+1)+","+sample+","+str(vec1[i])+","+str(vec2[i])+"\n")

n = int(maxBP)

# BAQ
# initialize with a pseudo count to avoid dividing by zero
countsA = [0.00000001] * n
Expand Down
9 changes: 6 additions & 3 deletions Pypkg/mgatk/mgatk/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ def main(mode, input, output, name, mito_genome, ncores,

# Handle fasta requirements
fastaf, mito_genome, mito_length = handle_fasta_inference(mito_genome, supported_genomes, script_dir, mode, of)

# Actually call the external script based on user input
if(barcode_known):
bc1py = script_dir + "/bin/python/bc1_known.py"
Expand Down Expand Up @@ -196,6 +195,9 @@ def main(mode, input, output, name, mito_genome, ncores,
sys.exit('ERROR: in `one` mode, the input should be an individual .bam file.')
if not os.path.exists(input):
sys.exist('ERROR: No file found called "' + input + '"; please specify a valid .bam file')

# Define input samples
sampleregex = re.compile(r"^[^.]*")
samples = [re.search(sampleregex, os.path.basename(input)).group(0)]
samplebams = [input]

Expand Down Expand Up @@ -239,10 +241,10 @@ def main(mode, input, output, name, mito_genome, ncores,
#-------------------
# Handle .fasta file
#-------------------
if(mode == "call" and wasbcall == False):
if((mode == "call" and wasbcall == False) or mode == "one"):
fastaf, mito_genome, mito_length = handle_fasta_inference(mito_genome, supported_genomes, script_dir, mode, of)
click.echo(gettime() + "Found designated mitochondrial chromosome: %s" % mito_genome, logf)

#----------------
# Determine cores
#----------------
Expand Down Expand Up @@ -294,6 +296,7 @@ def main(mode, input, output, name, mito_genome, ncores,
with open(y_s, 'w') as yaml_file:
yaml.dump(dict1, yaml_file, default_flow_style=False, Dumper=yaml.RoundTripDumper)


# Call the python script
oneSample_py = script_dir + "/bin/python/oneSample.py"
pycall = " ".join(['python', oneSample_py, y_s, inputbam, outputbam, sample])
Expand Down
2 changes: 1 addition & 1 deletion Pypkg/mgatk/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='mgatk',
version='0.3.6',
version='0.3.7',
url='https://github.com/aryeelab/mgatk',
license='MIT',
author='Caleb Lareau',
Expand Down

0 comments on commit 925bd12

Please sign in to comment.