<jupyter_start><jupyter_text>Test session This is an example of a typical iPAGE-2 session. First of all you need to import the package:<jupyter_code>from iPAGE2 import ipage2<jupyter_output><empty_output><jupyter_text>Then you should load the differential gene expression. You are free to use either the function from iPAGE2 package or your own script. Here we use differential expression in bladder carcinoma from Dyrskjot L, et al. (2004) Cancer Res 64, 4040-4048.<jupyter_code>de_genes, de_profile = ipage2.read_expression_file('bladder_refseq.exp', sep='\t')<jupyter_output><empty_output><jupyter_text>To run iPAGE2 you need to process pathway annotation first. You can avoid this step using already processed annotations from this project github page.<jupyter_code>#annotation_file = "../../ipage_data/msigdb/canonical_pathways.txt"
#ipage2.process_annotation(annotation_file, filter_redundant=True, 
#                          annotation_dir='../annotation_dir',
#                          annotation_name='canonical_pathways_gs')<jupyter_output><empty_output><jupyter_text>The shell command for this function is:```iPAGE2 -preprocess -annotation ../../ipage_data/msigdb/canonical_pathways.txt -filter_annotation -annotation_dir ../annotation_dir ```  Pathway deregulation  Finally, we can explore pathway deregulation by running the following commads:<jupyter_code>annotation_name = 'canonical_pathways_gs'
de_gene_format = 'refseq'
annotation_gene_format = 'gs'
output_name = 'stdout'
annotation_dir = '../annotation_dir'
pathway_hits = ipage2.run(de_genes, de_profile,
                         annotation_name, output_name=output_name,
                         de_ft=de_gene_format, ann_ft=annotation_gene_format,
                         filter_redundant=True, redundancy_ratio=0.2,
                         annotation_dir=annotation_dir)
pathway_hits.head()<jupyter_output><empty_output><jupyter_text>You can achieve same results using the following shell command: ```iPAGE2 -annotation canonical_pathways_gs -e bladder_refseq.exp -ann_ft gs -e_ft refseq --filter_results -redundancy_ratio 0.2 -o ../test -annotation_dir ../annotation_dir```  Deregulation of transcription factors You can find deregulated transcription factors using the annotation of transcription factors' binding sites. By increasing 'redundancy_ratio' parameter (when 'filter_redundant' is True) you can reduce the number of identified factors to only a few factors with the least similair binding targets.<jupyter_code>annotation_name = 'hg38_cistrome_index_ensg'
de_gene_format = 'refseq'
annotation_gene_format = 'ensg'
output_name = 'stdout'
annotation_dir = '../annotation_dir'
tf_hits = ipage2.run(de_genes, de_profile, annotation_name,
                         output_name=output_name, de_ft=de_gene_format,
                         ann_ft=annotation_gene_format,
                         annotation_dir=annotation_dir, regulator=True,
                         filter_redundant=True, redundancy_ratio=0.2)

tf_hits.head()<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup