Skip to content

Commit

Permalink
+ removed end check AVL tree comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
emptyewer committed Feb 17, 2017
1 parent 2e4c834 commit bb036f9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 468 deletions.
32 changes: 16 additions & 16 deletions functions/junctionf_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,22 +127,22 @@ def generate_tabulated_blast_results(self, directory, blast_results_folder, blas
print ">>> Parsing BLAST results file %s ..." % blasttxt
blast_dict, accession_dict, gene_dict = self._blast_parser(directory, blast_results_folder,
blasttxt, gene_list_file)
for key in blast_dict.keys():
if key not in ['total', 'pos_que']:
stats = {'in_orf' : 0, 'in_frame': 0, 'downstream': 0,
'upstream': 0, 'not_in_frame': 0,
'intron' : 0, 'backwards': 0, 'frame_orf': 0, 'total': 0
}
for nm in blast_dict[key].keys():
blast_dict[key][nm] = list(set(blast_dict[key][nm]))
for j in blast_dict[key][nm]:
j.ppm = blast_dict['pos_que'][j.pos_que] * 1000000 / blast_dict['total']
stats[j.frame] += 1
stats[j.orf] += 1
if j.frame_orf:
stats["frame_orf"] += 1
stats['total'] += 1
blast_dict[key]['stats'] = stats
# for key in blast_dict.keys():
# if key not in ['total', 'pos_que']:
# stats = {'in_orf' : 0, 'in_frame': 0, 'downstream': 0,
# 'upstream': 0, 'not_in_frame': 0,
# 'intron' : 0, 'backwards': 0, 'frame_orf': 0, 'total': 0
# }
# for nm in blast_dict[key].keys():
# blast_dict[key][nm] = list(set(blast_dict[key][nm]))
# for j in blast_dict[key][nm]:
# j.ppm = blast_dict['pos_que'][j.pos_que] * 1000000 / blast_dict['total']
# stats[j.frame] += 1
# stats[j.orf] += 1
# if j.frame_orf:
# stats["frame_orf"] += 1
# stats['total'] += 1
# blast_dict[key]['stats'] = stats

blast_dict.pop('pos_que')
blast_query_p = open(os.path.join(directory, blast_results_query_folder,
Expand Down
12 changes: 6 additions & 6 deletions gene_count_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ def make_read_dictionary(sam_file, chromosomes_list, bin_folder, exon_dict):
if line != '\n':
if not re.match(r'^@', split[0]):
chromosome = split[2][3:]
RUmapped = split[2]
r_umapped = split[2]
position = int(split[3])
if RUmapped != '*' and chromosome in exon_dict.keys():
if r_umapped != '*' and chromosome in exon_dict.keys():
total_reads += 1
iterations += 1
read_dict[chromosome].append(position)

if split[2] not in binoutfile_names.keys():#
handle = open(os.path.join(bin_folder, split[2] + '.bin'), 'wb')#
binoutfile_names[split[2]] = handle#
binoutfile_names[split[2]].write('%s:%s\n' % (split[3], split[9]))#
if split[2] not in binoutfile_names.keys():
handle = open(os.path.join(bin_folder, split[2] + '.bin'), 'wb')
binoutfile_names[split[2]] = handle
binoutfile_names[split[2]].write('%s:%s\n' % (split[3], split[9]))

for f in binoutfile_names.keys():
binoutfile_names[f].close()
Expand Down
4 changes: 3 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
export DEEPN_VERSION=2.5
export DEEPN_VERSION=2.61
rm -rf dist/*
rm -rf build/*
unzip lists/mm10GeneList.prn.zip ./lists/mm10GeneList.prn
Expand All @@ -19,4 +19,6 @@ mv dist/Blast\ Query.app dist/DEEPN.app/Contents/Resources
mv dist/Read\ Depth.app dist/DEEPN.app/Contents/Resources
echo "Unzipping Template DMG..."
bunzip2 -c template_dmg/template.dmg.bz2 > dist/temp.dmg
cd dist
tar cvfj Stat_Maker_${DEEPN_VERSION}_macOS.tar.bz2 Stat\ Maker.app
echo "Mount template_dmg/temp.dmg file, copy the DEEPN.app file to the mounted DEEPN folder, unmount temp.dmg, compress temp.dmg (using Disk Utility) and delete temp .dmg and DEEPN.app file."
Loading

0 comments on commit bb036f9

Please sign in to comment.