Commits

Marko Toplak committed 0b3c285

Removed obsolete examples.

Comments (0)

Files changed (5)

docs/reference-html/mirnaExamle1.py

-import random
-import obimiRNA
-
-miRNAs = obimiRNA.ids()
-
-print 'miRNA name\tAccession_Number\t\tSequence\t\tPre-forms\n'
-for m in random.sample(miRNAs, 10):
-    accession = obimiRNA.get_info(m).matACC
-    sequence = obimiRNA.get_info(m).matSQ
-    preForms = obimiRNA.get_info(m).pre_forms
-    print '%s\t%s\t\t%s\t\t%s' % (m, accession, sequence, preForms)

docs/reference-html/mirnaExamle2.py

-import random
-import obimiRNA
-
-mirnaHSA = obimiRNA.ids('hsa')
-
-for pm in reduce(lambda x,y: x+y, [obimiRNA.get_info(m).pre_forms.split(',') for m in random.sample(mirnaHSA,3)]):                                    
-    pre_miRNA = obimiRNA.get_info(pm,type='pre')
-    print
-    print 'Pre-miRNA name: %s' % pm
-    print 'Accession Number: %s' % pre_miRNA.preACC
-    print 'Accession Number of mature form(s): %s' % pre_miRNA.matACCs
-    print 'PubMed accession number(s): %s' % pre_miRNA.pubIDs
-    print 'Pre-miRNAs clustered together with %s: %s' % (pm, pre_miRNA.clusters)
-    print 'Link to miRBase: %s' % pre_miRNA.web_addr

docs/reference-html/mirnaExamle3.py

-import random
-import obiGO
-import obimiRNA
-
-annotations = obiGO.Annotations('hsa',obiGO.Ontology())
-miRNAs = random.sample(obimiRNA.ids('hsa'),10)
-
-print 'miRNA\tNumber of annotations\tGO_IDs\n'
-for mi,goList in obimiRNA.get_GO(miRNAs, annotations, goSwitch=False).items():
-    if goList:
-        print '%s\t%d\t%s' % (mi, len(goList), ','.join(goList[0:4])+'...')

docs/reference-html/mirnaExamle4.py

-import random
-import obiGO
-import obimiRNA
-
-annotations = obiGO.Annotations('hsa',obiGO.Ontology())
-
-miRNAs = random.sample(obimiRNA.ids('hsa'),10)
-
-dict_all = obimiRNA.get_GO(miRNAs, annotations, goSwitch=False)
-dict_enr = obimiRNA.get_GO(miRNAs, annotations, enrichment=True, goSwitch=False)
-
-dict_tfidf = obimiRNA.filter_GO(dict_all, annotations, reverse=False)
-
-print '#\tmiRNA name\t# All GO terms\t# Enriched GO terms\t# Filtred GO terms\n'
-for n,m in enumerate(miRNAs):
-    print '%d\t%s\t\t%d\t\t%d\t\t%d' % (n+1,m,len(dict_all[m]),len(dict_enr[m]),len(dict_tfidf[m]))

docs/reference-html/mirnaExamle5.py

-import random
-import obimiRNA
-
-miRNAs = random.sample(obimiRNA.ids('hsa'),10)
-
-mirPath_all= obimiRNA.get_pathways(miRNAs,enrichment=False, pathSwitch=False)
-mirPath_enr = obimiRNA.get_pathways(miRNAs,enrichment=True, pathSwitch=False)
-
-print 'miRNA_name\t# of pathways\t# of enriched pathways\n'
-for m in miRNAs:
-    print '%s\t\t%d\t\t%d' % (m,len(mirPath_all[m]),len(mirPath_enr[m]))