Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch/nf anno utils #186

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open

Patch/nf anno utils #186

wants to merge 16 commits into from

Conversation

anngvu
Copy link
Contributor

@anngvu anngvu commented Aug 15, 2024

Closes #182, #183, #178 with substantial rewrite of nf annotation utils for processed data. Since the API has breaking changes, testers and anyone using the new version should refer to the updated vignette: https://github.com/nf-osi/nfportalutils/blob/patch/nf-anno-utils/vignettes/annotate-nf-processed-data.Rmd.

Update: since these changes are more complicated than usual, I'd only suggest Robert or Jineta do actual code review to spot bugs, everyone else is tagged for end-user awareness about the updated vignettes.

@anngvu anngvu mentioned this pull request Sep 3, 2024
@allaway
Copy link
Collaborator

allaway commented Sep 16, 2024

Hey, I'm annotating some RNAseq data now using this.

One issue I came across in the vignette:

> o <- map_sample_output_rnaseq(syn_out, fileview) # check outputs only
Path: A 3D Cutaneous Neurofibroma Model for Automated High-Throughput Drug Screenings/NFOSI-processed-data/NF-OSI Processing - Unreleased/RNA Sequencing/star_salmon
Found 3 files for STAR and Salmon
Error in strsplit(paths, "/") : non-character argument

#' @export
#' @return List `manifest` with manifests for each processed dataset,
#' and `sample_io` with linked inputs and outputs (should be used for provenance annotation).
processed_meta <- function(input,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

processed_meta <- function(input,

This seemsl ike a bug:

> output <- map_sample_output_rnaseq(syn_out, fileview)
Path: Cutaneous Neurofibroma Data Resource/NF-OSI Processed Data/RNA-seq/processed
Found 66 files for STAR and Salmon
Found 0 files for featureCounts
Found 66 files for SAMtools
> meta <- processed_meta(input, output, workflow_link = wf_link)
Error in merge.data.table(output, input, by = "sample", all.x = TRUE,  : 
  Elements listed in `by` must be valid column names in x and y

removing featureCounts from 'outputs' fixed the issue, so maybe this fct could just toss out empty results from the list?


```{r rnaseq-meta-submit, eval=FALSE}
annotate_with_manifest(manifest_1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
annotate_with_manifest(manifest_1)
annotate_with_manifest(manifest_1)

I'm not sure what to put here as manifest_1 was not created earlier in the vignette. I tried these, which didn't work:

> annotate_with_manifest(meta)
Error in eval(jsub, SDenv, parent.frame()) : object 'entityId' not found
> annotate_with_manifest(meta$manifests)
Error in eval(jsub, SDenv, parent.frame()) : object 'entityId' not found
> annotate_with_manifest(meta$manifests$SAMtools)
Error in py_get_attr(x, name) : 
  AttributeError: 'Synapse' object has no attribute 'setAnnotations'. Did you mean: 'set_annotations'?

What am I missing? Thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I think this is a synapser version issue - oops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants