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

Add functionality for --unknown-slide in spaceranger/count #7233

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fasterius
Copy link
Contributor

There is an option to for Space Ranger Count to run without knowing the exact slide, --unknown-slide, that has been requested by users (see nf-core/spatialvi#99 (comment)). This PR adds this to the spaceranger/count module, which uses the already existing meta.slide value as input.

This would work well for the nf-core/spatialvi pipeline, since no other changes would need to be done; rather than specifying a slide (e.g. H1-VJQNJXM) in the slide samplesheet column the user would specify visium-[1,2,2-large,hd] and leave the area column empty. I'm sure there are other ways of doing it, though, and would be happy to change it if somebody thinks another solution would be better.

PR checklist

  • This comment contains a description of changes (with reason).

Add functionality to be able to use the `--unknown-slide` option of
Space Ranger Count, specified using the `slide` column in the input
samplesheet.
@fasterius fasterius requested a review from grst December 17, 2024 08:37
@fasterius fasterius changed the title Add functionality for --unknown-slide option Add functionality for --unknown-slide in spaceranger/count Dec 17, 2024
@fasterius
Copy link
Contributor Author

While the Conda tests are expected to fail (is there a way to disable Conda for some modules?), I'm not sure why some of the other tests are failing. Some seem to have run out of memory, while others reach an unexpected EOF when pulling the Docker image. The linting is also failing in a weird manner, saying it can't connect to the Docker image URL, while it clearly works fine for some most tests. Any ideas?

@grst grst closed this Dec 18, 2024
@grst grst reopened this Dec 18, 2024
def slide = meta.slide ? meta.slide : ""
def area = meta.area ? meta.area : ""
if (slide.matches("visium-(.*)") && area == "" && slidefile == "") {
slide_and_area = "--unknown-slide=\"${slide}\""
Copy link
Member

Choose a reason for hiding this comment

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

Would --unknown-slide take any arguments? I thought it's a boolean flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not a boolean, it takes visium-[1,2,2-large,hd] as argument.

Comment on lines +34 to +40
def slide = meta.slide ? meta.slide : ""
def area = meta.area ? meta.area : ""
if (slide.matches("visium-(.*)") && area == "" && slidefile == "") {
slide_and_area = "--unknown-slide=\"${slide}\""
} else {
slide_and_area = "--slide=\"${slide}\" --area=\"${area}\""
}
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this at all? We could also rely on the pipeline developers to specify --area etc. via task.ext.args, e.g.

process {
  withName: SPACERANGER_COUNT {
     task.ext.args = { (meta.slide & meta.area) ? "--area=\"${meta.area}\" --slide=\"${meta.slide}\"" : "--unknown-slide" }
  }

}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I did think about this, but since this is specifically part of the Space Ranger Count software as an explicit option, I thought it made more sense to have it in the module itself. It's also required to actually specify the version of Visium being run (e.g. --unknown-slide visium-1), which is also a demand of the software itself. It felt odd to me to write something so software-specific outside of the software module.

@grst
Copy link
Member

grst commented Dec 18, 2024

The linting is also failing in a weird manner, saying it can't connect to the Docker image URL, while it clearly works fine for some most tests. Any ideas?

just restarted the checks, let's see

Copy link
Member

@grst grst left a comment

Choose a reason for hiding this comment

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

Your comments make sense, I'm happy with the changes then.

@fasterius
Copy link
Contributor Author

Great! Any ideas regarding the failing tests/linting? I'm still seeing the same errors.

@grst
Copy link
Member

grst commented Dec 18, 2024

unfortunately not... best to ask around on slack I guess.

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

Successfully merging this pull request may close these issues.

3 participants