GetEnvironmentDatafromFileR: Parse the FASTA headers to retrieve the sample information.

Description Usage Arguments Details Value Author(s) Examples

Description

The function selects the part of the headers (starting with ">") and reports a substring that should contain the sample information for that sequence.

Usage

1
GetEnvironmentDatafromFileR(File = "HGB_0013_GXJPMPL01A3OQX.fasta",Start=2,Stop=9,test=TRUE)

Arguments

File

character. The stored FASTA alignment that was used for oligotyping.

Start

numeric. Start of character string to be retrieved (character position. Start=2 means the first character after the ">" symbol.

Stop

numeric. Stop of the character string to be retrieved (character position.

test

logical. If TRUE, only the first header (i.e. the first line) of the FASTA file is analysed. This helps determine the exact length of the Start and Stop parameters above, without processing the whole dataset. Then this may be switched to FALSE for the actual computation for all headers in the file.

Details

It may be faster to provide the sample information in a separate file and not in the header of the fasta sequences.

Value

A vector of characters corresponding to the actual selected substring for each header if test is FALSE. If test is TRUE, then only one string is returned (substring from the first header).

Author(s)

Alban Ramette

Examples

1
2
3
4
# GetEnvironmentDatafromFileR(File,Start=2,Stop=9,test=TRUE)
# [1] "HGB_0010"
# ENV <- GetEnvironmentDatafromFileR(File,Start=2,Stop=9,test=FALSE)
# length(ENV) ## 1175

aramette/otu2ot documentation built on May 10, 2019, 12:46 p.m.