raw2Fas: Read and converting raw DNA files to fasta format.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Given the specified directory, this function could read and convert raw DNA files to fasta format. It is an alternative to read.fasta as the later read only one fasta file. The advantage of using raw2Fas when dealing with fasta files rather than using file.cat is that this function would convert the fasta files to the fasta in a robost way.

Usage

1
raw2Fas(dir = NULL, appendix = ".fasta")

Arguments

dir

a character string naming the directory fasta files exist.

appendix

Appendix of raw DNA data files to combine.

Details

Only the file possesses the the specied appendix will be read and converted.

Value

Returns the object of class "fasta".

Author(s)

Jinlong zhang jinlongzhang01@gmail.com Qiong Ding dingqiong1@gmail.com

References

None.

See Also

See Also read.fasta, file.cat for importing "fasta" files from local machine.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#########
######
### raw2Fas() example
cat(
">No305",
"NTTCGAAAAACACACCCACTACTAAAANTTATCAGTCACT",
file = "dna1.fas", sep = "\n")
cat(
">No304",
"ATTCGAAAAACACACCCACTACTAAAAATTATCAACCACT",
file = "dna2.fas", sep = "\n")
cat(
">No305",
"NTTCGAAAAACACACCCACTACTAAAANTTATCAGTCACT",
file = "dna3.fas", sep = "\n")

raw2Fas(getwd(), appendix = ".fas")

unlink("dna1.fas")
unlink("dna2.fas")
unlink("dna3.fas")

helixcn/seqRFLP documentation built on May 17, 2019, 3:37 p.m.