addAlnPosToAnno: Add alignment positions to an annotation data frame

Description Usage Arguments Value Examples

View source: R/VCF_Utils.R

Description

Add alignment positions to an annotation data frame

Usage

1
addAlnPosToAnno(anno_df, aln_df, intersect_only = TRUE)

Arguments

anno_df

an annotation data frame from readAnnotationFile

aln_df

an alignment data frame

intersect_only

(logical) only keep rows containing matching positions in aln_df (default is TRUE)

Value

an annotation data frame with columns from an alignment data frame joined by transcript ID and position

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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]])

addAlnPosToAnno(anno_df, aln_df)

wrightrc/r1001genomes documentation built on Sept. 11, 2018, 1:40 a.m.