예제 #1
0
genedata = Ensembl.EnsemblGenes(assembly=assembly)

genes = Ensembl.ReverseGeneMapping(genedata)

genespluspromotor = Ensembl.ReverseGeneMapping(
    genedata, tssPadding=UPSTREAM_PROMOTOR_DIST)

genepromotors = Ensembl.ReversePromotorMapping(
    genedata,
    upstreamPadding=UPSTREAM_PROMOTOR_DIST,
    downstreamPadding=DOWNSTREAM_PROMOTOR_DIST)

exons = Ensembl.ReverseExonMapping(genedata)

transcriptionSites = Ensembl.TranscriptionSites(genedata)

# UCSC table browser - Expression & Regulation - CpG Islands
# Download all columns with exception of "bin"
cpgIslands = ExtendedBed(
    os.path.expanduser("/mnt/50tb/publicdata/" + assembly +
                       "/CpGIslands/cpgislands.bed"))

# UCSC table browser - Mapping and Sequencing - Chromosome Bands
# Download all columns with exception of "gieStain"
gBanding = ExtendedBed(os.path.expanduser("/mnt/50tb/publicdata/" + assembly +
                                          "/G-Banding/cytogenetic.map.bed"),
                       defaultkeys=["chrm", "start", "stop", "band"],
                       forcekeys=True)

chromosomeEnds = ChromosomeEnds(assembly)
예제 #2
0
TSS_TTS_Distance = 5000
TTS_TTS_Distance_Human = str(TSS_TTS_Distance / 1000) + "kb"

Small_TSS_TTS_Distance = 1000
Small_TTS_TTS_Distance_Human = str(Small_TSS_TTS_Distance / 1000) + "kb"

# load data

genedata = Ensembl.EnsemblGenes(assembly="hg18", annotation="ncbi36.1")

genes = Ensembl.ReverseGeneMapping(genedata)

exons = Ensembl.ReverseExonMapping(genedata)

transcriptionSites = Ensembl.TranscriptionSites(genedata)

cpgIslands = ExtendedBed(
    os.path.expanduser(
        "~/mount/publicdata/hg18/cpgislands/cpgislands-0-index.bed"))

affyannotation = NetAffxAnnotation()

paddedGenes = Ensembl.ReverseGeneMapping(genedata, tssPadding=TSS_TTS_Distance)


def isUpstream(distance, strand):
    if strand == "+":
        return 'Y' if distance >= 0 else 'N'
    elif strand == "-":
        return 'Y' if distance <= 0 else 'N'