Render an ASCII Ruler

An ASCII ruler is for measuring text and is especially useful for sequence analysis. Included in this package are methods to create ASCII rulers and associated GenBank sequence blocks, multi-column text displays that make it easy for viewers to locate nucleotides by position.


Build Status

Description

An ASCII ruler is for measuring text and is especially useful for sequence analysis. Methods asciiruler to create ASCII rulers and genbank_seqblock to create "GenBank sequence blocks", known for their distinctive column-structure, are provided.

Usage

devtools::install_github("leipzig/asciiruler")
library("asciiruler")
asciiruler(low=-30,high=30,borders=TRUE)
+----------------------------------------------------------------+
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|  |    |    |    |    |    |    |    |    |    |    |    |    | |
|-30  -25  -20  -15  -10   -5    0    5    10   15   20   25   30|
+----------------------------------------------------------------+
my_sequence<-
'GATCACAGGTCTATCACCCTATTAACCACTCACGGGAGCTCTCCATGCATTTGGTATTTTCGTCTGGGGG
GTATGCACGCGATAGCATTGCGAGACGCTGGAGCCGGAGCACCCTATGTCGCAGTATCTGTCTTTGATTC
CTGCCTCATCCTATTATTTATCGCACCTACGTTCAATATTACAGGCGAACATACTTACTAAAGTGTGTTA
ATTAATTAATGCTTGTAGGACATAATAATAACAATTGAATGTCTGCACAGCCACTTTCCACACAGACATC'
my_seqblock<-genbank_seqblock(my_sequence)
cat(my_seqblock)
    1    6     11   16    21   26    31   36    41   46    51   56   
    |    |     |    |     |    |     |    |     |    |     |    |    
    |||||||||| |||||||||| |||||||||| |||||||||| |||||||||| ||||||||||
  1 GATCACAGGT CTATCACCCT ATTAACCACT CACGGGAGCT CTCCATGCAT TTGGTATTTT
 61 CGTCTGGGGG GTATGCACGC GATAGCATTG CGAGACGCTG GAGCCGGAGC ACCCTATGTC
121 GCAGTATCTG TCTTTGATTC CTGCCTCATC CTATTATTTA TCGCACCTAC GTTCAATATT
181 ACAGGCGAAC ATACTTACTA AAGTGTGTTA ATTAATTAAT GCTTGTAGGA CATAATAATA
241 ACAATTGAAT GTCTGCACAG CCACTTTCCA CACAGACATC

News

asciiruler 0.2

Bug fixes and minor improvements

  • Added test_that and travis-ci
  • Better handling of start/end edge cases

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("asciiruler")

0.2 by Jeremy Leipzig, 2 years ago


Browse source code at https://github.com/cran/asciiruler


Authors: Jeremy Leipzig <[email protected]>


Documentation:   PDF Manual  


GPL-3 | file LICENSE license


Imports stringr

Suggests testthat


See at CRAN