This file contains hidden or 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
| #### Author: http://web1.sph.emory.edu/users/hwu30/ | |
| #### example scripts to play with BAM files. | |
| library(GenomicRanges) | |
| library(GenomicFeatures) | |
| library(Rsamtools) | |
| ## first get gene information from UCSC. This will take 2 minutes or so. | |
| ## Or if you have these saved you can load them in using: refGene.hg18=loadFeatures("refGene.hg18.GR.sqlite") | |
| refGene.hg18=makeTranscriptDbFromUCSC(genom="hg18",tablename="refGene") | |
| tx=transcripts(refGene.hg18) |
This file contains hidden or 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
| require(pROC) | |
| set.seed(1026) | |
| obs<-rep(0:1, each=50) | |
| pred<-c(runif(50,min=0,max=0.8),runif(50,min=0.3,max=0.6)) | |
| plot(roc(obs,pred),print.auc=TRUE, auc.polygon=TRUE,max.auc.polygon=TRUE,auc.polygon.col="#DEEBE8",grid=c(0.1,0.2),grid.col=c("blue","red"),print.thres=TRUE) |
This file contains hidden or 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
| #!/usr/bin/python | |
| from math import * | |
| strG = str(raw_input("Genome sequence: ")) | |
| strR = str(raw_input("Read sequence: ")) | |
| strG = strG.upper() | |
| strR = strR.upper() | |
| print "Your genome ref input : " +strG | |
| print "Your read ref input : " +strR | |
| matrix = [] |
This file contains hidden or 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
| EOS = "$" | |
| ''' | |
| All sort algorithm here use the Built-in `sort` function inside Python | |
| ''' | |
| refSeq = raw_input("Your ref: ") | |
| if not refSeq: | |
| refSeq = "ACAACG" | |
| def print_table(table): | |
| ''' |
This file contains hidden or 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
| # Copied From: https://svn.transvar.org/repos/genomes/trunk/pub/src/spliceAnal.py | |
| #!/usr/bin/env python | |
| """ | |
| This file contains code for analyzing novel splicing events from | |
| FindJunctions or Tophat junction features. | |
| If running this interactively, use the writeJunctions method to create | |
| a file that classifies junctions according to whether they are new or | |
| novel, internal or external to a known gene, and their frequency of |
This file contains hidden or 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
| #!/usr/bin/perl -w | |
| use strict; | |
| # Notice: | |
| # BED annotation should be sorted by the GeneID or GeneName ahead | |
| # otherwise duplication in output | |
| my $inBed = shift || die $!; | |
| my $outUnion = shift || die $!; | |
| open OUT, "> $outUnion"; |
This file contains hidden or 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
| library(ShortRead) | |
| # Root of .bam filename | |
| sname <- "HG00100.unmapped.ILLUMINA.bwa.GBR.low_coverage.20130415" | |
| # Construct path to file | |
| fname <- file.path("alignments",paste(sname,".bam",sep="")) | |
| # Read alignments | |
| bm <- readGappedAlignments(fname) |
This file contains hidden or 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
| ## Demo for HMM | |
| ## Reproduce "What is HMM", Sean R Eddy, Nature Biotechnology 2004 | |
| S <- c(0,1,rep(0,3)) | |
| E <- c(0, 0.9, 0.1, 0, 0) | |
| SS5 <- c(rep(0,3), 1, 0) | |
| I <- c(rep(0,3), 0.9, 0.1) | |
| N <- c(rep(0,4), 1) | |
| myTransMtx <- rbind(S,E, SS5, I, N) | |
| colnames(myTransMtx) <- rownames(myTransMtx) |
This file contains hidden or 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
| <div class="panel-group" id="accordion"> | |
| <div class="panel panel-default"> | |
| <div class="panel-heading"> | |
| <h4 class="panel-title"> | |
| <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseOne"> | |
| Accordian1 | |
| </a> | |
| </h4> | |
| </div> | |
| <div id="collapseOne" class="panel-collapse collapse in"> |
This file contains hidden or 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
| %!TEX TS-program = xelatex | |
| \documentclass[12pt]{scrartcl} | |
| % The declaration of the document class: | |
| % The second line here, i.e. | |
| % \documentclass[12pt]{scrartcl} | |
| % is a standard LaTeX document class declaration: | |
| % we say what kind of document we are making in curly brackets, | |
| % and specify any options in square brackets. |