Skip to content

Commit

Permalink
Merge pull request #26 from TheJacksonLaboratory/spaceranger3-metrics…
Browse files Browse the repository at this point in the history
….json

For `spaceranger v3`, the metrics.json will be generated by a simple (frankensteinish) check for the tool version
  • Loading branch information
ahmed-said-jax authored Sep 12, 2024
2 parents 650a509 + 1686d7c commit b1c1b96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions modules/spaceranger.nf
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ process SPACERANGER_COUNT {

visium_hd_prefixes = ["H1", "SJ", "14072023", "14082023", "26062023", "RD", "UN"]
is_visium_hd = visium_hd_prefixes.collect { serial_prefix.startsWith(it) }.any()
is_spaceranger3 = record.tool_version[0].toInteger() >= 3
"""
spaceranger count $main_options --localcores=$task.cpus --localmem=$localmem
Expand Down Expand Up @@ -99,6 +100,10 @@ process SPACERANGER_COUNT {
url_base="http://s3-us-west-2.amazonaws.com/10x.spatial-slides/gpr"
wget -O "${spatial_dir}/${record.slide}.gpr" "\${url_base}/${serial_prefix}/${record.slide}.gpr"
fi
if [[ ${is_spaceranger3} ]]; then
find ${record.output_id}/SPATIAL_RNA_COUNTER/ -type f -name "metrics_summary_json.json" -exec mv {} ${record.tool_pubdir}/summary.json \\;
fi
"""
}

Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ manifest {
homePage = "https://github.com/TheJacksonLaboratory/nf-tenx"
mainScript = "main.nf"
nextflowVersion = "!>=20.10.0"
version = "0.7.9"
version = "0.7.10"
}

0 comments on commit b1c1b96

Please sign in to comment.