Network analysis on TCGA data
Pipeline
Pipeline contains all the necessary steps to run a complete analysis
Run statistics
import tacos
tacos.statistics()
tacos.tacos.shuffleLabels()
Make bipartite network
from sbmtm import sbmtm
model = sbmtm()
model.make_graph_from_BoW(df)
model.save_graph("graph.xml.gz")
Run stochastic block model
interactively
docker run -it -p8888:8888 -v $(PWD):/home/filippo/files --entrypoint /bin/bash fvalle01/hsbm 2
jupyter notebook --ip0.0.0.0
as executable
docker run -it -v $(PWD):/home/filippo/files/ fvalle01/hsbm:standard 2
Note there must be a graph.xml.gz file in current working directory
TCGA
TCGA get manifest
TCGA_GetManifest creates a file called manifest.txt that is useful to download data using gdc-client download -m manifest.txt
command
TCGA API
TCGA_API is useful to retrieve informations about a single file (sample)
Table
Table creation
Table_Creation reads a folder with the data downloaded with gdc-client and creates a mainTable.csv dataset
Table mining
Table_Mining is useful to extract means and vars per tissues. It stores a meanVariances.csv file useful in next step
Table Analyzer
Table_Analyzer is useful to plot expression per tissues histograms and FPKM means and distributions. Here it mean versus occurrence is created.
Table by gene type
Table_ByGeneType is useful to do analysis separating protein coding from non coding excetera
Table by tissue
Table_ByTissue perform analysis looking at different tissues
Table protein coding
Table_ProteinCoding isolate a mainTable.csv file with only protein coding genes. Creates a genes_pc.txt file with all ENSG-id that are related to a protein-coding gene
Table microRNA
Table_microRNA as above but with microRNA
Table Analyzer
Table_tfidf perform tf-idf analysis
hSBM
topics
hSBM_topics analyse topic composition
clusters
hSBM_clusters bench the performance in clustering samples
topic_dist
hSBM_topic-dist analyse topic distribution inside samples
Analysis
Use Tool for Analyse COmponents Systems
Zipf
Use Zipf.ipynb to plot Zipf and U (occurrence distribution)
Heaps
Use Heaps.ipynb to plot Heaps distibution