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
package example | |
import org.apache.spark.{SparkConf, SparkContext} | |
import org.apache.spark.rdd.RDD | |
import org.bdgenomics.adam.rdd.ADAMContext | |
import org.bdgenomics.formats.avro.NucleotideContigFragment | |
/** | |
* Created by dahljo on 7/14/15. | |
*/ |
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
/* | |
* Copyright (c) 2012 The Broad Institute | |
* | |
* Permission is hereby granted, free of charge, to any person | |
* obtaining a copy of this software and associated documentation | |
* files (the "Software"), to deal in the Software without | |
* restriction, including without limitation the rights to use, | |
* copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the | |
* Software is furnished to do so, subject to the following |
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
<link rel="import" href="../polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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
# Instruct Shiny Server to run applications as the user "shiny" | |
run_as shiny; | |
# Define a server that listens on port 3838 | |
server { | |
listen 3838; | |
# Define a location at the base URL | |
location / { |
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(ggplot2) | |
library(reshape2) | |
library(maps) | |
# A tab separated file with contries and participats. | |
# Note that Unites States needs to be changed to USA and United Kingdom | |
# to UK. | |
path.to.contry.and.participants.file <- "~/Desktop/contries.csv" | |
participants <- |
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/bash -l | |
#SBATCH -A b2010028 | |
#SBATCH -p core | |
#SBATCH -n 2 | |
#SBATCH -t 10:00:00 | |
#SBATCH -J prepare_ref | |
#SBATCH -o prepare_ref-%j.out | |
#SBATCH -e prepare_ref-%j.error | |
# Author: Johan D |
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
package molmed | |
import net.sf.samtools.util.SortingCollection | |
import net.sf.samtools.BAMRecordCodec | |
import net.sf.picard.fastq.FastqRecord | |
import java.util.Comparator | |
import java.io.InputStream | |
import java.io.PrintStream | |
import net.sf.picard.fastq.FastqConstants |
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(ggplot2) | |
setwd("<my working directory>") | |
removeExtraLine <- function(x) { | |
x[,2:length(x)] | |
} | |
createInitialDataset <- function(x, sampleName) { | |
extraLineRemoved <- t(removeExtraLine(x)) |
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
import scala.io.Source | |
import java.io.File | |
object GCCounter extends App { | |
val file = new File("Homo_sapiens.GRCh37.67.dna_rm.chromosome.Y.fa") | |
// The actual GC counting function | |
def countGCOnLine(line: String): (Long, Long) = { | |
if (line.startsWith(">")) |
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
import org.scalatest.FunSuite | |
import BetterCodeExample._ | |
class BetterCodeExampleUnitTests extends FunSuite { | |
test("Burrow wheelers transform of ^BANANA|") { | |
assert(BetterCodeExample.burrowsWheelersTransform("^BANANA|") === """BNN^AA|A""") | |
} | |