logomaker_format_input: Format conversion from FASTA, Genbank, CLustalW. PhyLIP...

Description Usage Arguments Value Examples

View source: R/logomaker_format_input.R

Description

Takes as input a FASTA/ClustalW/PhyLIP files or accession numbers from Genbank and converts the sequences into a vector of aligned sequences, ready to be fed into the logomaker function. (see examples in logomaker to see its input format, which is same as the output format for this function).

Usage

1
2
logomaker_format_input(filename = NULL, accession = NULL,
  lower_base = 1, upper_base = Inf)

Arguments

filename

Name of the file with stored aligned sequences - may be of the format .phylip (PHYLIP), .aln (CLUSTAL) or .fasta(FASTA). May also be NULL if Genbank accession codes input accession is non NULL

accession

A vector of accession numbers for GenBank. Not null when filename is NULL.

lower_base

The base position from which to start recording the sequence. Defaults to 1.

upper_base

The base position at which to end recording the sequence. Defaults to Inf. That would comprise of the full sequence if lower_base = 1

Value

Returns a vector of aligned sequences, that are ready to be fed as input to the logomaker function

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(seqinr)
out <- logomaker_format_input(filename = system.file("sequences/gopher.fasta", 
                              package = "seqinr"),
                              lower_base = 1, upper_base = 15)
out <- logomaker_format_input(filename = system.file("sequences/test.aln", 
                              package = "seqinr"),
                              lower_base = 1, upper_base = 15)
out <- logomaker_format_input(filename = system.file("sequences/test.phylip", 
                              package = "seqinr"),
                              lower_base = 1, upper_base = 15)
out <- logomaker_format_input(accession =  c("U15717", "U15718", "U15719",
                          "U15720", "U15721", "U15722", "U15723", "U15724"),
                           lower_base = 1, upper_base = 10)

kkdey/Logolas documentation built on May 20, 2019, 10:30 a.m.