Description Usage Arguments Details Value Note Author(s) Examples
Import a FASTA alignment from a file and if needed converts the space in the FASTA headers into underscore "_"
1  | ImportFastaAlignment(File,fixSpaceinHeaders=TRUE)
 | 
File | 
 path to the FASTA file  | 
fixSpaceinHeaders | 
 logical. If TRUE, replaces spaces in the headers by underscores. The function runs faster if this is turned to FALSE. Alternatively, one can "clean" the headers before importing the alignment to R!  | 
require(seqinr)
The function returns a list containing a vector of names (rows) and a matrix of sequence nber by site List with two items:
Seqs.names  | 
 FASTA headers  | 
Seqs.only  | 
 only the FASTA sequences as vectors of bases. This is in a matrix format.  | 
require(seqinr)
Alban Ramette
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  | #require(seqinr)
#write.fasta(sequences="mock-env-aligned.fasta",file.out="mock-env-aligned.fasta")
#mock_env_aligned.list <-  ImportFastaAlignment(File="mock-env-aligned.fasta",fixSpaceinHeaders=TRUE)
#data(mock_env_aligned.list) # resulting list after importing from the previous line
#FastaHeaders <-  mock_env_aligned.list[[1]]
#Sequences  <-   mock_env_aligned.list[[2]]
#SEQUENCES <- toupper(Sequences) #convert sequences to capital letters
#Nseqs <-  nrow(Sequences) #nber of sequences
#Nbases <- ncol(Sequences)#nber of bases
 
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.