Skip to content

Commit

Permalink
remove old code and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
mparker2 committed Nov 26, 2020
1 parent 8bc4cb7 commit a554d00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
30 changes: 1 addition & 29 deletions differr/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,32 +68,4 @@ def write_stats_to_bed(bed_fn, results):
G_stat_A_p_val=G_A_p,
G_stat_B=G_B,
G_stat_B_p_val=G_B_p
))


PHASING_BED_RECORD = (
'{chrom}\t{start:d}\t{end:d}\t'
'DER_site\t{score:.0f}\t{strand}\t'
'{n_polya_sites:d}\t{G_stat:.2f}\t{p_val:.2f}\t'
'{q_val:.2f}\t{homo_G_stat:.2f}\n'
)


def write_phasing_stats_to_bed(bed_fn, results):
'''
Write the results to a bed file (with a bunch of extra columns for G-test results)
'''
with open(bed_fn, 'w') as bed:
for _, chrom, pos, strand, n_polya_sites, homo_G, hetero_G, p_val, fdr in results.itertuples():
bed.write(PHASING_BED_RECORD.format(
chrom=chrom,
start=pos,
end=pos + 1,
score=nlog10(fdr),
strand=strand,
n_polya_sites=n_polya_sites,
G_stat=hetero_G,
p_val=nlog10(p_val),
q_val=nlog10(fdr),
homo_G_stat=homo_G
))
))
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@

setup(
name='differr',
version='0.1',
version='0.2',
description=(
'identify sites with differential mismatches caused by m6A in ONT DRS data'
),
author='Matthew Parker',
entry_points={
'console_scripts': [
'differr = differr.main:differr',
'phaserr = differr.phasing:identify_three_prime_phasing',
'polya_test = differr.cluster:find_polya_clusters',
]
},
packages=[
Expand Down

0 comments on commit a554d00

Please sign in to comment.