chunkAnnotation: Add a chunks column to an annotation data frame

Description Usage Arguments Value Examples

Description

This function adds chunk information for wrapping an alignment and annotations across multiple rows. This will also split individual annotations across rows.

Usage

1
chunkAnnotation(anno_df, chunks)

Arguments

anno_df

an annotation data frame from readAnnotationFile with attached alignment positions from addAlnPosToAnno

chunks

a data frame of chunks to facet an alignment/annotation data frame across

Value

anno_df with the addition of chunks columns (and potentially extra rows) for facetting

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## first make a gene info DF
geneInfo <- getGeneInfo(genes = c("AT3G62980", "AT3G26810"))

## read in an annotation DF
anno_df <- readAnnotationFile(filename = system.file("extdata",
"AFB_annotations.csv", package = "r1001genomes"), gene_info = geneInfo )

## make an alignment DF
IDs <- c("AT3G62980.1", "AT3G26810.1")
alignment <- alignCDS(IDs)
aln_df <- makeAlnDF(alignment[[2]])
aln_df <- chunkAlnDF(aln_df)
chunks <- makeChunksDF(aln_df)

anno_df <- addAlnPosToAnno(anno_df, aln_df)

chunkAnnotation(anno_df, chunks)

wrightrc/r1001genomes documentation built on Nov. 10, 2019, 12:45 p.m.