Data Integrator (Python API)
Namespaces | Functions | Variables
Misc.py File Reference

Namespaces

 common.Misc
 Miscellaneous functions useful all over the project.
 

Functions

def common.Misc.FileType (pathname)
 Low level compression determination. More...
 
def common.Misc.OpenFile4Reading (pathname, mode="r")
 Opens file for reading. More...
 
def common.Misc.TypeConvert (value, toType, warn=True)
 Data conversion with error logging. More...
 
def common.Misc.GetGRChVersion (dver)
 Get the human Genome Reference Consortium genome build version used by Ensembl. More...
 
def common.Misc.SplitGenomicCoord (coord, dver, warn=True, retainBuild=False)
 Splits a standard string for genomic location. More...
 
def common.Misc.SplitSNPGenomicCoord (coord, dver, warn=True)
 Splits genomic coordinates from a SNP. More...
 
def common.Misc.GetGenomicCoordinateString (build, chromosome, startPos, endPos=None, warn=True)
 Create the Genomic Coordinate string in the format Build:Chromosome:Start -End or Build:Chromosome:Start (in the case where start and end are equal). More...
 
def common.Misc.ComplementaryDNA (seq, reverse=False)
 Compute the complementary DNA sequence of a given sequence string. More...
 
def common.Misc.WCheckInputColumns (writer, cols, line, lineNr, permissiveness, warn=True, exitCode=1, index0=True)
 Check applicability of column indices and apply permissiveness mode. More...
 
def common.Misc.CheckInputColumns (cols, nrCols, lineNr, stop, warn=True, exitCode=1, index0=True, lastLen=None)
 Check applicability of column indices. More...
 
def common.Misc.CheckInputLengths (len, lastLen, lineNr, warn=True)
 Check the length of an input line by comparing it to the last line. More...
 
def common.Misc.ConvertInputIndices (cols, warn=True, exit=False)
 Convert input column(s) to table indices. More...
 

Variables

list common.Misc.VALID_HS_CHROMOSOMES = [str(x) for x in range(1,23)] + ["X", "Y", "MT"];
 
int common.Misc.FT_FAILED = -1;
 Error when trying to peek into file. More...
 
int common.Misc.FT_UNK = 0;
 No compression detected. More...
 
int common.Misc.FT_COMPRESS = 1;
 Unix compress file. More...
 
int common.Misc.FT_GZIP = 2;
 GZIP file. More...
 
int common.Misc.FT_BZIP2 = 3;
 BZIP2 file. More...