Simple helper function to obtain a trace (e.g. MCMC trace) of the ordered inferential replicates for one samples. Supports either multiple features, idx, or multiple samples, samp_idx (not both). Returns a tidy data.frame for easy plotting.

getTrace(y, idx, samp_idx)

Arguments

y

a SummarizedExperiment with inferential replicates as assays infRep1 etc.

idx

the names or row numbers of the gene or transcript to plot

samp_idx

the names or column numbers of the samples to plot

Value

a data.frame with the counts along the interential replicates, possible with additional columns specifying feature or sample

Examples


y <- makeSimSwishData()
getTrace(y, "gene-1", "s1")
#>    infRep count
#> 1       1    87
#> 2       2    93
#> 3       3    74
#> 4       4    86
#> 5       5    64
#> 6       6    64
#> 7       7    83
#> 8       8    81
#> 9       9    66
#> 10     10    78
#> 11     11    82
#> 12     12    92
#> 13     13    65
#> 14     14    93
#> 15     15    90
#> 16     16    78
#> 17     17    69
#> 18     18    71
#> 19     19    80
#> 20     20    80