A function to perform a statistical test at a sgRNA-level
measure_sgrna_stats(
sgcount,
design,
group_a,
group_b,
delim = "_",
ge_id = NULL,
sg_id = NULL
)
This data frame contains read counts of sgRNAs for the samples.
This table contains study design. It has to contain `group.`
The first group to be tested.
The second group to be tested.
The delimiter between a gene name and a sgRNA ID. It will be used if only rownames contains sgRNA ID.
The column name of the gene column.
The column/columns of sgRNA identifiers.
A table contains the sgRNA-level test result, and the table contains these columns:
`sgRNA': The sgRNA identifier.
`gene': The gene is the target of the sgRNA
`n_a': The number of replicates of the first group.
`n_b': The number of replicates of the second group.
`phat_a': The proportion value of the sgRNA for the first group.
`phat_b': The proportion value of the sgRNA for the second group.
`vhat_a': The variance of the sgRNA for the first group.
`vhat_b': The variance of the sgRNA for the second group.
`cpm_a': The mean CPM of the sgRNA within the first group.
`cpm_b': The mean CPM of the sgRNA within the second group.
`logFC': The log fold change of sgRNA between two groups.
`t_value': The value for the t-statistics.
`df': The value of the degree of freedom, and will be used to calculate the p-value of the sgRNA.
`p_ts': The p-value indicates a difference between the two groups.
`p_pa': The p-value indicates enrichment of the first group.
`p_pb': The p-value indicates enrichment of the second group.
`fdr_ts': The adjusted P-value of `p_ts'.
`fdr_pa': The adjusted P-value of `p_pa'.
`fdr_pb': The adjusted P-value of `p_pb'.
# NOT RUN {
library(CB2)
data(Evers_CRISPRn_RT112)
measure_sgrna_stats(Evers_CRISPRn_RT112$count, Evers_CRISPRn_RT112$design, "before", "after")
# }
Run the code above in your browser using DataLab