Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ploy-np committed Nov 20, 2020
1 parent f61af5d commit a3acb73
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Contents

installation
quickstart
outputtable
configuration
preparation
scripts
Expand Down
22 changes: 22 additions & 0 deletions docs/source/outputtable.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. _outputtable:

Output table description
=========================

============= ==============
Column name Description
============= ==============
id transcript or gene id
position transcript or gene position
kmer 5-mer where modified base sits in the middle if modified
diff_mod_rate_<condition1>_vs_<condition2> differential modification rate between condition1 and condition2 (modification rate of condition1 - modification rate of condition2)
z_score_<condition1>_vs_<condition2> z score obtained from z-test of the differential modification rate
pval_<condition1>_vs_<condition2> significance level from z-test of the differential modification rate
mod_rate_<condition>-<replicate> modification rate of a replicate in the condition
mu_unmod inferred mean of the unmodified RNAs distribution
mu_mod inferred mean of the modified RNAs distribution
sigma2_unmod inferred sigma^2 of the unmodified RNAs distribution
sigma2_mod inferred sigma^2 of the modified RNAs distribution
conf_mu_unmod confidence level of mu_unmod compared to the unmodified reference signal
conf_mu_mod confidence level of mu_unmod compared to the unmodified reference signal
mod_assignment lower if mu_mod < mu_unmod and higher if mu_mod > mu_unmod
30 changes: 30 additions & 0 deletions xpore/scripts/dataprep.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,36 @@ def preprocess_tx(tx_id,data_dict,out_paths,locks): # todo
f.write(log_str + '\n')


def index_nanopolish(eventalign_filepath,summary_filepath,out_dir,n_processes):
with helper.EventalignFile(eventalign_filepath) as eventalign_file, open(summary_filepath,'r') as summary_file:

# reader_summary = csv.DictReader(summary_file, delimiter="\t")
# reader_eventalign = csv.DictReader(eventalign_file, delimiter="\t")

# row_summary = next(reader_summary)
# read_name = row_summary['read_name']
# read_index = row_summary['read_index']
# eventalign_per_read = []
# for row_eventalign in reader_eventalign:
# if (row_eventalign['read_index'] == read_index):
# eventalign_per_read += [row_eventalign]
# else:
# # Load a read info to the task queue.
# if read_name not in read_names_done:
# task_queue.put((read_name,eventalign_per_read,out_paths))
# # Next read.
# try:
# row_summary = next(reader_summary)
# except StopIteration: # no more read.
# break
# else:
# read_index = row_summary['read_index']
# read_name = row_summary['read_name']
# assert row_eventalign['read_index'] == read_index
# eventalign_per_read = [row_eventalign]



def main():
args = get_args()
#
Expand Down

0 comments on commit a3acb73

Please sign in to comment.