Giter Site home page Giter Site logo

gyro's Introduction

gyro

R wrapper scripts for genomic tools


Overview

gyro provides a set of wrapper scripts for executing popular command-line genomic tools from R. Gyro currently only supports Linux-based systems because of it's use of shell pipes and redirection. It may also require the shell R is run in to be bash.

Why?

gyro facilitates the use of genomic programs and pipelines on multiple data sets quickly and easily without the need for shell scripting. In general, the output of gyro functions are the names of the files generated by the output of the program being called. This enables the use of quickly passing the output files of one program as the input files for another program. Below is an example of the execution of a chip-seq pipeline with all fastq files in the current working directory (using magrittr pipes and the converge R package).

# define a vector of file names for all fastq files in the current working directory
f <- files("*.fastq")

# define path to genome chrom sizes file
genome <- "/path/to/genome.chrom.sizes"

# go from fastq to genomewide coverage in a single line
f %>% bowtie("/path/to/bowtieindex") %>% samtoolsView(minQual=10) %>% \
bamToBed %>% bedtoolsGenomeCov(genome) %>% bedGraphToBigWig(genome) -> bigWigs

# without magrittr pipes, one can achieve the same thing as follows
sams <- bowtie(f,"/path/to/bowtieindex")
bams <- samtoolsView(sams,minQual=10)
beds <- bamToBed(bams)
bgs  <- bedtoolsGenomeCov(beds,genome)
bws  <- bedGraphToBigWig(bgs,genome)

Installation

Install devtools if not installed already:

install.packages("devtools")

Then install conifur (convenience functions for R), then gyro:

devtools::install_github("dvera/conifur")
devtools::install_github("dvera/gyro")

The following R packages are recommended:

devtools::install_github("dvera/converge")
devtools::install_github("dvera/travis")

A given program must be installed and available in your $PATH in order to use a gyro script that calls the program. A complete list of programs is tabulated below:

program gyro function name
bcftools call bcftoolsCall
bcftools filter bcftoolsFilter
bcftools merge bcftoolsMerge
bcftools query bcftoolsQuery
bcftools view bcftoolsView
bedtools closest bedtoolsClosest
bedtools coverage bedtoolsCoverage
bedtools genomecov bedtoolsGenomeCov
bedtools intersect bedtoolsIntersect
bedtools makewindows bedtoolsMakeWindows
bedtools map bedtoolsMap
bedtools merge bedtoolsMerge
bedtools multicov bedtoolsMultiCov
bedtools shuffle bedtoolsShuffle
bedtools slop bedtoolsSlop
bedtools subtract bedtoolsSubtract
bfc bfc
bgzip bgzip
bowtie bowtie
bowtie2 bowtie2
bwa aln bwaAln
bwa index bwaIndex
bwa sampe bwaSampe
bwa samse bwaSamse
bwa sw bwaSw
cuffdiff cuffdiff
cufflinks cufflinks
cutadapt cutadapt
FastQC fastqc
fastqp fastqp
featureCounts featureCounts
hisat hisat
kallisto quant kallistoQuant
kent utils bedClip kentBedClip
kent utils bigWigAverageOverBed kentBigWigAverageOverBed
kent utils liftOver kentLiftOver
macs callpeak macsCallPeak
sambamba rmdup sambambaRmdup
samtools cat samtoolsCat
samtools index samtoolsIndex
samtools merge samtoolsMerge
samtools mpileup samtoolsMpileup
samtools sort samtoolsSort
samtools view samtoolsView
seqtk seq seqtkSeq
seqtk trimfq seqtkTrimfq
stringtie stringtie
tophat tophat

gyro's People

Watchers

James Cloos avatar Katie Kyle avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.