This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scipy.io as sio | |
import pandas as pd | |
#Load Data | |
data = sio.loadmat('<your path>/GSM3017261_150000_CNS_nuclei.mat') | |
#Digital Expression Matrix | |
DGE = data['DGE'] | |
#Genes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The MIT License (MIT) | |
Copyright (c) 2016 Ryan Dale | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import matplotlib | |
from matplotlib.patches import Circle, Wedge, Polygon, Rectangle | |
from matplotlib.collections import PatchCollection | |
import matplotlib.pyplot as plt | |
def karyoplot(karyo_filename, metadata={}, part=1): | |
''' | |
To create a karyo_filename go to: http://genome.ucsc.edu/cgi-bin/hgTables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code snippet to get chromosomal position and cytoband from gene symbols using | |
# biomaRt | |
# Kenneth Daily, 2014 | |
library(biomaRt) | |
ensembl <- useMart("ensembl", dataset = "hsapiens_gene_ensembl") | |
# Only use standard human chromosomes | |
normal.chroms <- c(1:22, "X", "Y", "M") |