Description Usage Arguments Value Author(s) References Examples
test base count (A,T,G,C) difference at a given position between the two bam files. The base count matrix is tested by fisher exact test and euclidean distance. If nothing difference, NULL will be returned.
1 |
bam1 |
the first bam file to be compared |
bam2 |
the second bam file to be compared |
refFsa |
the reference fasta file used for bam1 and bam2 alignments |
regChr |
chromosome name of the region of interest, it should match the chromosome name in reference name |
regStart |
the start position (1-based) of the region of interest |
regEnd |
the end position (1-based) of the region of interest |
minBaseQuality |
the minimum base quality to be used for base count |
minMapQuality |
the minimum read mapping quality to be used for base count |
nCores |
number of thread used for calculate in parallel |
pValueCutOff |
p.value cutoff from fisher.test to display output. If there is no difference between two compared positions (p.value = 1 and d.value = 0), NULL will be returned even setting pValueCutOff = 1. |
baseDistCutOff |
euclidean distance cutoff from dist(,method='euclidean') to display output. If there is no difference between two compared positions (p.value = 1 and d.value = 0), NULL will be returned even setting baseDistCutOff = 0. |
verbose |
print progress on screen, default = TRUE. |
snpDiff
: returns a data.frame with difference information: chromosome, position, reference base, base count (A,C,G,T,N) for two bam files, p.value (fisher exact test of these base counts) and d.value (euclidean distance of these base counts)
Xiaobin Xing, <email:xiaobinxing0316@gmail.com>
Morgan M, Pages H, Obenchain V and Hayden N. Rsamtools: Binary alignment (BAM), FASTA, variant call (BCF), and tabix file import.
1 2 3 4 5 | bam1 <- system.file(package='SICtools','extdata','example1.bam')
bam2 <- system.file(package='SICtools','extdata','example2.bam')
refFsa <- system.file(package='SICtools','extdata','example.ref.fasta')
snpDiff(bam1,bam2,refFsa,'chr04',962501,1026983,pValueCutOff=1,baseDistCutOff=0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.