truncate_sequences.length {LocaTT} | R Documentation |
Truncate DNA Sequences to Specified Length
Description
Truncates DNA sequences to a specified length.
Usage
truncate_sequences.length(sequences, length, quality_scores)
Arguments
sequences |
A character vector of DNA sequences to truncate. |
length |
Numeric. The length to truncate DNA sequences to. |
quality_scores |
An optional character vector of DNA sequence quality scores. If supplied, these will be truncated to their corresponding truncated DNA sequences. |
Value
If quality scores are not provided, then a character vector of truncated DNA sequences is returned. If quality scores are provided, then a list containing two elements is returned. The first element is a character vector of truncated DNA sequences, and the second element is a character vector of quality scores which have been truncated to their corresponding truncated DNA sequences.
See Also
truncate_sequences.quality_score
for truncating DNA sequences by Phred quality score.
truncate_sequences.probability
for truncating DNA sequences by cumulative probability that all bases were called correctly.
Examples
truncate_sequences.length(sequences=c("ATATAGCGCG","TGCCGATATA","ATCTATCACCGC"),
length=5,
quality_scores=c("989!.C;F@\"","A((#-#;,2F","HD8I/+67=1>?"))