Detailed Description
This packages provides algorithms working on :func:`FeatureStream <bbcflib.btrack.FeatureStream>`.
It is divided into three major groups depending on the algorithm's return type:
* :mod:`bbcflib.bFlatMajor.stream` returns :func:`FeatureStream <bbcflib.btrack.FeatureStream>` objects,
* :mod:`bbcflib.bFlatMajor.numeric` returns numeric arrays or matrices,
* :mod:`bbcflib.bFlatMajor.figure` returns figure files (pdf, png, etc.).
Algorithms can be used via a direct import::
from bbcflib.bFlatMajor import stream
for chrom in track1.chrmeta.keys():
catstream = stream.concatenate([track1.read(chrom),track2.read(chrom)])
or via the global :func:`run <bbcflib.bFlatMajor.run>` function. The latter will take file names as input parameters, while a direct call requires :func:`FeatureStream <bbcflib.btrack.FeatureStream>` to be created beforehands.
Most functions in :mod:`bFlatMajor <bbcflib.bFlatMajor>` take one or more lists of :func:`FeatureStream <bbcflib.btrack.FeatureStream>` as parameters, plus additional algorithm-specific parameters.
Function Documentation
def bbcflib::bFlatMajor::run |
( |
|
kwargs |
) |
|
Wrapper function to execute any operation contained in this package, directly from
file inputs. Arguments are:
:param operation: (str) the name of the function to be called.
:param output: (str) a filename or a directory to write the results into.
:param assembly: (str) a genome assembly identifier if needed.
:param chromosome: (str) a chromosome name if operation must be restricted to a single chromsome.
:param ...: additional parameters passed to `operation`.
Example::
run(operation="mean_score_by_feature",
output="score_output.bed", chromosome="chr1",
trackScores="density_file.sql", trackFeatures="genes.sql")