Add gene annotations when using "sleuth_results", addressing #86 #95
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi sleuth team,
I have added a small bit of code to address #86, where a user noticed that no annotations were included in the results table after using
aggregation_column
thensleuth_results
.The code first removes the target_id column (the "transcripts") from the
target_mapping
table, and then reduces it down to unique rows: one for each "gene" (aggregation_column).The code then uses dplyr's
left_join
to put them together, using the syntax forby
to join two different columns (target_id
in the results table, andobj$gene_column
for the reduced target_mapping table).Because lintr is currently disabled and the "give a design matrix" test is broken on the master branch, I didn't bother making those changes again. I tried to make sure the added was lintr clean. I don't think additional tests are necessary for this additional code, because the necessary checks are done during
sleuth_prep
.Let me know if you have any feedback!