coalispr.bedgraph_analyze.unselected

Module for dealing with unselected reads retrieved from unspecific data.

Attributes

Classes

Unsel_graph_binner

Convert bedgraph files to binned and then pickled data with common

Functions

has_unselected()

Returns True if merged, unselected data are available.

merge_unsel([tee])

Unselect bedgraphs are combined but kept separate from the data.

process_unselected()

Retrieve extra bamfiles, if any and prepare them for common analysis.

Module Contents

coalispr.bedgraph_analyze.unselected.logger
coalispr.bedgraph_analyze.unselected.has_unselected()

Returns True if merged, unselected data are available.

class coalispr.bedgraph_analyze.unselected.Unsel_graph_binner

Convert bedgraph files to binned and then pickled data with common index.

Output is stored in folder with STOREPATH and STOREPICKLE for TAGBAM reads, due to retrieval of unselected reads during counting (of this kind of alignment file).

bedgraphdict1

Dictionary with PLUS data.

Type:

dict

bedgraphdict2

Dictionary with MINUS data.

Type:

dict

bedgraphdict1: dict
bedgraphdict2: dict
classmethod process_unselgraphs_for_sample(name)

Function to use by multiprocessor.

classmethod bin_unsel_bedgraphs(bedgraphdict1, bedgraphdict2)

Assemble processed unselected bedgraph data.

coalispr.bedgraph_analyze.unselected.merge_unsel(tee=False)

Unselect bedgraphs are combined but kept separate from the data.

Parameters:

tee (bool) – Flag defining to return dataframes for immediate use (storing them does not allow for this).

Returns:

  • None – When tee is False; print message upon completion of function.

  • dict, dict – When tee is True, return dicts, one for each strand with dataframes, one for each chromosome, with merged data for reference samples.

coalispr.bedgraph_analyze.unselected.process_unselected()

Retrieve extra bamfiles, if any and prepare them for common analysis. Because this deals with target RNAs (say siRNAs) present in UNSPECIFIC reads, only these kind of reads will be considered. As counting by default will be done on TAGBAM bam files, as set in the configuration, this is the tag to search for and use.