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
#! /bin/Rscript | |
run_em <- function(data, cutoff = 1.50, theta_init = 0.5, iter = 100, tolerance = 1e-4) { | |
missing = data[data == cutoff] | |
observed = data[data != cutoff] | |
n1 = length(observed) | |
n2 = length(missing) | |
n = n1 + n2 | |
theta_current = theta_init | |
theta_new = 0 |
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
#List all the instrument-data that is imported | |
genome instrument-data list imported "sample.patient.common_name='TST1ds' and sample.extraction_type = 'genomic dna'" | |
genome instrument-data list imported "sample.patient.common_name='TST1ds' and sample.extraction_type = 'rna'" | |
#Define the models based on imported instrument-data, rename the ID's | |
genome model define rna-seq --reference-sequence-build='106942997' --annotation-build='124434505' --cancer-annotation-db='tgi/cancer-annotation/human/build37-20131010.1' --subject='H_NJ-HCC1395ds-HCC1395_RNA' --processing-profile='2762841' --instrument-data='0296e0aeeb3f4daab1e8604cddb2cb70' --model-name='hcc1395ds-tumor-rnaseq' | |
genome model define rna-seq --reference-sequence-build='106942997' --annotation-build='124434505' --cancer-annotation-db='tgi/cancer-annotation/human/build37-20131010.1' --subject='H_NJ-HCC1395ds-HCC1395_BL_RNA' --processing-profile='2762841' --instrument-data='675561c466744c8498f903b77ee9acbe' --model-name='hcc1395ds-normal-rnaseq' | |
ge |
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
sub _run_workflow { | |
my $self = shift; | |
my $lsf_queue = $ENV{GENOME_LSF_QUEUE_BUILD_WORKER_ALT}; | |
my $lsf_project = 'varscan_filter'; | |
my $w = Workflow::Operation->create( | |
name => "Filter Varscan SNVs", | |
operation_type => Workflow::OperationType::Command->get( | |
'Genome::Model::Tools::Capture::FormatSnvs') | |
); |
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
#Avinash Ramu, Conrad Lab, WUSTL | |
#Estimate the kmer statistic in a specified window | |
#use overlapping windows to capture the kmers at the edges. Make sure the start of the read lies within the window. | |
#Arguments - a region in the form "chr\tstart\tstop" i.e $1=chr $2=start $3=end | |
#Updates | |
#modified - 6/13 made it $6 - ($7 + $8 ) in other words I removed /2 | |
#modified - 6/14 cleanup the code. | |
#modified - 6/19 add a column for the reference kmer counts |
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/env Rscript | |
library(cn.mops) | |
usage <- function() | |
{ | |
writeLines("Usage:\n\tRscript Cnmops.pm.R tumor.bam normal.bam capture.bed outdir --test[or --notest]") | |
} | |
convert_start_end_character <-function(t) { | |
t$start <- sprintf("%d", t$start) |
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
# load up area shape file: | |
library(maptools) | |
area <- readShapePoly("ne_10m_parks_and_protected_lands_area.shp") | |
# # or file.choose: | |
# area <- readShapePoly(file.choose()) | |
library(RColorBrewer) | |
colors <- brewer.pal(9, "BuGn") |
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
<!doctype HTML> | |
<meta charset = 'utf-8'> | |
<html> | |
<head> | |
<script src='http://ramnathv.github.io/rCharts/libraries/widgets/polycharts/js/polychart2.standalone.js' type='text/javascript'></script> | |
<style> | |
.rChart { | |
display: block; |
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
usage <- function() | |
{ | |
writeLines("Usage:\n\tRscript tumorVsNormal.R tumor.bam normal.bam capture.bed") | |
} | |
args <- commandArgs(trailingOnly = TRUE) | |
if(length(args) != 3) { | |
usage() | |
quit() |
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/env python | |
#This example uses the 'requests' library | |
#To install requests: | |
# sudo pip install requests | |
#If you don't have pip: | |
# see http://www.pip-installer.org/en/latest/installing.html | |
# or | |
# wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py | |
# sudo python get-pip.py |
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
usage <- function() | |
{ | |
writeLines("Usage:\n\tRscript tumorVsNormal.R tumor.bam normal.bam chromosome") | |
} | |
args <- commandArgs(trailingOnly = TRUE) | |
if(length(args) != 3) { | |
usage() | |
quit() |