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
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions modules/nf-core/spaceranger/count/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,23 @@ process SPACERANGER_COUNT {
def cytaimage = cytaimage ? "--cytaimage=\"${cytaimage}\"" : ""
def darkimage = darkimage ? "--darkimage=\"${darkimage}\"" : ""
def colorizedimage = colorizedimage ? "--colorizedimage=\"${colorizedimage}\"" : ""
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.

} else {
slide_and_area = "--slide=\"${slide}\" --area=\"${area}\""
}
Comment on lines +34 to +40
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.

"""
spaceranger count \\
--id="${prefix}" \\
--sample="${meta.id}" \\
--fastqs=. \\
--slide="${meta.slide}" \\
--area="${meta.area}" \\
--transcriptome="${reference}" \\
--localcores=${task.cpus} \\
--localmem=${task.memory.toGiga()} \\
$image $cytaimage $darkimage $colorizedimage \\
$slide_and_area \\
$probeset \\
$alignment \\
$slidefile \\
Expand Down
Loading