splitChr: Split all chromosomes from the sorted chromosome list

Description Usage Arguments Value Author(s) Examples

View source: R/splitChr.R

Description

Split all chromosomes from the sorted chromosome list

Usage

1
splitChr(tex = tex, chr = chr, sex = FALSE, outdir = ".")

Arguments

tex

The sorted chromosome list made by sortList function.

chr

The chromosome number sequence, if the chromosome list is "single" which means a single character following "chr" in the Fasta identifier, be sure starting with 1 and ending with 9; if the chromosome list is "double" which means two characters following "chr" in the Fasta identifier, be sure that starting with 10 but the ending can be changed.

sex

Whether to output the sex chromosomes like X chromosome and Y chromosome.

outdir

The output directory.

Value

Write the splitted chromosome Fasta file to separated txt files according to the chromosome number.

Author(s)

Shaoqian Ma

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(tex)
data(text)
#Simplify the Fasta id
text<- replaceText(type = "text",input = text)
#Subtract id
id <- subFasID(text = text)
#Sort the fasta according to the chromosome number in id
tex2<- sortList(id=id,tex = tex,chrsig = "single")
tex3 <- sortList(id=id,tex = tex,chrsig = "double")
outdir <- tempdir()
#Output the results
splitChr(tex = tex2,chr=seq(1,9),sex = TRUE,outdir = outdir)
splitChr(tex = tex3,chr=seq(10,22),sex = FALSE,outdir = outdir)

Example output



chromseq documentation built on July 1, 2020, 10:24 p.m.