Giter Site home page Giter Site logo

genecovr's Introduction

genecovr

R build status

genecovr is an R package that provides plotting functions that summarize gene transcript to genome alignments. The main purpose is to assess the effect of polishing and scaffolding operations has on the quality of a genome assembly. The gene transcript set is a large sequence set consisting of assembled transcripts from RNA-seq data generated in relation to a genome assembly project. Therefore, genecovr serves as a complement to software such as BUSCO, which evaluates genome assembly quality using a smaller set of well-defined single-copy orthologs.

Installation

You can install the released version of genecovr from NBIS GitHub with:

# If necessary, uncomment to install devtools
# install.packages("devtools")
devtools::install_github("NBISweden/genecovr")

Usage

genecovr script quick start

There is a helper script for generating basic plots located in PACKAGE_DIR/bin/genecovr. Create a data input csv-delimited file with columns

  1. data label
  2. mapping file (supported formats: psl)
  3. assembly file (fasta or fasta index)
  4. transcript file (fasta or fasta index)

Columns 3 and 4 can be set to missing value (NA) in which case sequence sizes will be inferred from the alignment files. Then run the script to generate plots:

PACKAGE_DIR/bin/genecovr indata.csv

Example

There are example files located in PACKAGE_DIR/inst/extdata consisting of two psl alignment files containing gmap alignments and fasta indices for the transcript sequences and two for different assembly versions:

  • nonpolished.fai - fasta index for raw assembly
  • polished.fai - fasta index for polished assembly
  • transcripts.fai - fasta index for transcript sequences
  • transcripts2nonpolished.psl - gmap alignments, transcripts to raw assembly
  • transcripts2polished.psl - gmap alignments, transcripts to polished assembly

Using these files and the labels non and pol for the different assemblies, a genecovr input file (called e.g., assemblies.csv) would look as follows:

nonpol,transcripts2nonpolished.psl,nonpolished.fai,transcripts.fai
pol,transcripts2polished.psl,polished.fai,transcripts.fai

and the command to run would be:

genecovr assemblies.csv

genecovr options

To list genecovr script options, type ’genecovr -h`:

usage: genecovr [-h] [-v] [-p number]
                             [-d OUTPUT_DIRECTORY] [--height HEIGHT]
                             [--width WIDTH]
                             csvfile

positional arguments:
  csvfile               csv-delimited file with columns
                            1. data label
                            2. mapping file (supported formats: psl)
                            3. assembly file (fasta or fasta index)
                            4. transcript file (fasta or fasta index)

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         print extra output
  -p number, --cpus number
                        number of cpus [default 1]
  -d OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY
                        output directory
  --height HEIGHT       figure height in inches [default 6.0]
  --width WIDTH         figure width in inches [default 6.0]

R package vignette

Alternatively, import the library in an R script and use the package functions. See Get started or run vignette("genecovr") for a minimum working example.

genecovr's People

Contributors

percyfal avatar

Stargazers

Quentin Andres avatar

Watchers

Erik Ylipää avatar Valentin Georgiev avatar James Cloos avatar Joel Hedlund avatar Johan avatar Björn avatar  avatar Jonas Hagberg avatar Johan Nylander avatar  avatar  avatar  avatar Per Johnsson avatar  avatar Jessica Lindvall avatar John Lövrot avatar Jonas Söderberg avatar Guilherme Borges Dias avatar  avatar Agustín Andrés Corbat avatar  avatar Martin Pippel avatar Nima Rafati avatar Fredrik Levander avatar Airen Zaldivar Peraza avatar  avatar  avatar Tomas Larsson avatar Juliana Assis avatar Dag Ahren avatar Markus Ringnér avatar  avatar Olga avatar  avatar Ashfaq Ali avatar Jeanette Tångrot avatar Emilio Mármol Sánchez avatar Jinxin Zhao avatar  avatar

Forkers

jinxinmonash

genecovr's Issues

Add option to summarize number of inserts etc over entire transcript

Summarizing transcript is done by function geneBodyCoverage. However, the number of mismatches is lost as there is redundancy in the overlaps - we don't know where the mismatches occur. Either choose the best (longest) hit, or merge, weighting the number of mismatches by the width of the matches.

Make readDNAStringSet emulate samtools faidx behaviour

readDNAStringSet uses the entire fasta description line as name whereas samtools faidx uses the first characters up to a whitespace. This causes problems when generating fasta index within genecovr as sequence identifiers will differ.

Fix order of factor plots

Several plots don't show entries in order as provided in the config file. In particular this holds for:

  • depth_breadth_coverage
  • depth_breadth_hist
  • depth_breadth_jitter
  • depth_breadth_seqlengths
  • gene_body_coverage.minmatch
  • ncontigs_per_transcript

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.