bartongroup / RATS

Relative Abundance of Transcripts: An R package for the detection of Differential Transcript isoform Usage.
MIT License
32 stars 1 forks source link

Sleuth input structure changed. #33

Closed fruce-ki closed 6 years ago

fruce-ki commented 6 years ago

Investigating error discovered by @nickschurch:

Bootstrapping replicates...
|======================================================================================            |  88%
Error in `[.data.table`(Transcripts, , `:=`(sumB, rowSums(counts_B, na.rm = TRUE))) : 
RHS of assignment to existing column 'sumB' is zero length but not NULL. 
If you intend to delete the column use NULL. 
Otherwise, the RHS must have length > 0; e.g., NA_integer_. 
If you are trying to change the column type to be an empty list column then, 
as with all column type changes, provide a full length RHS vector such as 
vector('list',nrow(DT)); i.e., 'plonk' in the new column.

(Data and workflow script sent to me privately)

fruce-ki commented 6 years ago

Sourcing the workflow script does not run at all. RATs rejects the input sleuth object:

Relative Abundance of Transcripts v.0.5.0.0
Checking parameters...
Error in slo$kal[[1]]$bootstrap[[1]] : subscript out of bounds

This suggests an error in the input data. Possibly a change in structure for sleuth objects?

fruce-ki commented 6 years ago

Using fish4rodents() to bypass the sleuth intermediate steps and load the bootstrapped counts directly from the quantification files and then swapping the slo input argument of call_DTU() with the boot_data_A & boot_data_B arguments, completes the replicate bootstrapping step error-free. In fact, RATs completes it's entire run without errors.

This again suggests the error is specific to the sleuth-based input mode, rather than an internal bug, as all input modes converge onto the same route before any testing even begins.

fruce-ki commented 6 years ago

Looking at the structure of the sleuth object generated by the workflow script. The expected field names are all there. However, the object contains no bootstrapping data.

fruce-ki commented 6 years ago

Indeed, sleuth version 0.29 explicitly states in the CHANGELOG that the bootstraps are no longer stored in memory. No alternative option is provided.

Solution options: We are no longer dependent on sleuth objects as input, and the other input modes are probably more practical. The choice is between dropping support altogether for this input path, as it no longer offers that unique convenience, or creating a fallback to unbootstrapped mode for sleuth versions >=0.29, while still allowing older versions of sleuth to be used.

Leaning towards dropping support. This would simplify documentation and clarify instructions. Systems that use old sleuth versions are likely to also use old RATs versions.