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    60
#> 2       2    70
#> 3       3    83
#> 4       4    65
#> 5       5    78
#> 6       6    91
#> 7       7    81
#> 8       8    76
#> 9       9    87
#> 10     10   101
#> 11     11    66
#> 12     12    93
#> 13     13    77
#> 14     14    83
#> 15     15    64
#> 16     16    65
#> 17     17    92
#> 18     18    93
#> 19     19    86
#> 20     20    76