read_table | R Documentation |
Create a read table from a BAM file and variant calls
read_table(bam_file, bai_file = NULL, variant_calls, pu = NULL, debug = F)
bam_file |
bam file |
bai_file |
index file. If missing then .bai appendix on bam_file is assumed. |
pu |
A BAM pileup object returned by BAM_pileup method. If NULL, a pile up will be created |
variant_calls. |
A data.frame specifying positions and nucleotides on reference to be taken as true variants, see details. |
variant_calls has 6 columns which must be names as c("pos", "A", "C", "G", "T", "-"). pos gives the position at which a true variant exists. The other columns have logical entries, with TRUE meaning that a true variant exists with the corresponding nucleotide.
A data.frame with columns: count pos1 pos2 .. posn. Each row of the data.frame corresponds to a collection of reads that are identical at the variable positions. The count column gives the number of reads with the values specified in the posi columns. Every read is listed in the table, so that the sum of the count column gives the total number of reads. The posi are the positions specified by variant_calls, i.e. posi==as.character(variant_calls$pos[i]). Entries in the posi columns are either A/C/G/T/-/NA. NA means the read did not cover that variable position.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.