Description Usage Arguments Value Author(s) Examples
View source: R/FastaUtils_functions.R
This function cuts pieces of sequences of a fixed length ('read.length') either by sampling randomly a multi-fasta file or by selecting an equal number of pieces from each sequence within a multi-fasta file.
1 2 3 4 5 6 7 8 9 10 |
infile |
Multi-Fasta file. |
sampling.type |
Sampling type: select a fixed pieces from each sequence ('none', default), performs a uniform random sampling ('uniform') or a sampling based on a lognormal distribution. In the first case the total number of pieces has to be multiple of the number of sequences. |
total.reads |
Total number of pieces. |
read.length |
Length of te pieces to be cut. |
file.out |
Path to output file. |
replacement |
Logical for using or not (default) sampling of sequences with replacement. Only applies if 'sampling.type=T'. |
meanlog, sdlog |
mean and standard deviation of the distribution on the log scale with default values of 0 and 1 respectively. |
Writes a fasta file with the selected sequences and a tab-delimites file with the sequence name and the start and end position of the cut. This file gets the 'file.out' names and adds '.info' at the end.
Guillem Salazar <salazar@icm.csic.es>
1 | fasta.cutter(infile="http://greengenes.lbl.gov/Data/JD_Tutorial/UnAligSeq24606.txt",sampling.type="uniform",file.out="out.fasta",total.reads=15,read.length=20)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.