Skip to content

update bellavista - include inputs to tar file #6951

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
26 changes: 17 additions & 9 deletions tools/bellavista/bellavista_prepare.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,30 @@
mkdir -p 'input' 'input/BellaVista_output' &&
chmod -R 777 'input/' &&
#if $technology_conditional.plot_genes.plot_transcripts == "true":
ln -s '$technology_conditional.plot_genes.transcript_filename' './input/${technology_conditional.plot_genes.transcript_filename.element_identifier}.${technology_conditional.plot_genes.transcript_filename.ext}' &&
cp '$technology_conditional.plot_genes.transcript_filename' './input/${technology_conditional.plot_genes.transcript_filename.element_identifier}.${technology_conditional.plot_genes.transcript_filename.ext}' &&
#end if
#for $image in $technology_conditional.images:
ln -s '$image' 'input/${image.element_identifier}.${image.ext}' &&
cp '$image' 'input/${image.element_identifier}.${image.ext}' &&
#end for
ln -s '$bellavista_config_file' './input/config.json' &&
cp '$bellavista_config_file' './input/config.json' &&
#if $technology_conditional.plot_cell_segmentation.plot_cell_seg == "true":
ln -s '$technology_conditional.plot_cell_segmentation.cell_segmentation' './input/${technology_conditional.plot_cell_segmentation.cell_segmentation.element_identifier}.${technology_conditional.plot_cell_segmentation.cell_segmentation.ext}' &&
cp '$technology_conditional.plot_cell_segmentation.cell_segmentation' './input/${technology_conditional.plot_cell_segmentation.cell_segmentation.element_identifier}.${technology_conditional.plot_cell_segmentation.cell_segmentation.ext}' &&
#end if
#if $technology_conditional.plot_nuclear_segmentation.plot_nuclear_seg == "true":
ln -s '$technology_conditional.plot_nuclear_segmentation.nuclear_segmentation' './input/${technology_conditional.plot_nuclear_segmentation.nuclear_segmentation.element_identifier}.${technology_conditional.plot_nuclear_segmentation.nuclear_segmentation.ext}' &&
cp '$technology_conditional.plot_nuclear_segmentation.nuclear_segmentation' './input/${technology_conditional.plot_nuclear_segmentation.nuclear_segmentation.element_identifier}.${technology_conditional.plot_nuclear_segmentation.nuclear_segmentation.ext}' &&
#end if
#if $technology_conditional.technology == "MERSCOPE":
ln -s '$technology_conditional.um_to_px_transform' './input/micron_to_mosaic_pixel_transform.csv' &&
cp '$technology_conditional.um_to_px_transform' './input/micron_to_mosaic_pixel_transform.csv' &&
#end if
cat ./input/config.json &&
cat './input/config.json' &&

cp './input/config.json' './input/config_orig.json' &&

cd "\$BELLAVISTA_DIR" &&
bash '$__tool_directory__/bellavista.bash' &&
cd .. &&

tar -czf 'bellavista.tar.gz' 'input/BellaVista_output'
tar -czf 'bellavista.tar.gz' 'input/'
]]></command>
<configfiles>
<configfile name="bellavista_config_file"><![CDATA[
Expand Down Expand Up @@ -122,7 +124,7 @@
</inputs>
<outputs>
<data name="bellavista_output" format="tar.gz" label="${tool.name} on ${on_string}: Bellavista prepared inputs" from_work_dir="./bellavista.tar.gz" />
<data name="config" format="json" label="${tool.name} on ${on_string}: config file" from_work_dir="input/config.json">
<data name="config" format="json" label="${tool.name} on ${on_string}: config file" from_work_dir="input/config_orig.json">
<filter>advanced_output['config']</filter>
</data>
</outputs>
Expand Down Expand Up @@ -151,8 +153,12 @@
</section>
<output name="bellavista_output">
<assert_contents>
<has_archive_member path="input/config_orig.json"/>
<has_archive_member path="input/mosaic_PolyT_z3.tif"/>
<has_archive_member path="input/micron_to_mosaic_pixel_transform.csv"/>
<has_archive_member path="input/BellaVista_output/gene_dict.pkl"/>
<has_archive_member path="input/BellaVista_output/OMEzarrImages"/>
<has_archive_member path="input/BellaVista_output/OMEzarrImages/.zgroup"/>
<has_archive_member path="input/BellaVista_output/um_to_px_transforms.pkl"/>
</assert_contents>
</output>
Expand Down Expand Up @@ -204,6 +210,8 @@ BellaVista is an open-source visualization tool for imaging-based spatial transc

Users can customize the visualization by selecting specific genes, adjusting image rotation angles, and controlling the size of transcript points. BellaVista also provides options for plotting cell and nuclear segmentation, enhancing the exploration of spatial transcriptomics data.

For large images, it is highly recommended to use the Bellavista Prepare tool to preprocess the inputs with high computing power. The tool will create a tarball with all the necessary processed files and it can be used directly for bellavista interactive tool.

.. image:: https://raw.githubusercontent.com/pkosurilab/BellaVista/c8129bb8954c92962a87606595c09b35cc414295/images/bellavista_figure.png
:height: 500
:width: 700
Expand Down
2 changes: 1 addition & 1 deletion tools/bellavista/macros.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<macros>
<token name="@TOOL_VERSION@">0.0.2</token>
<token name="@VERSION_SUFFIX@">0</token>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@PROFILE@">23.0</token>
<xml name="requirements">
<requirements>
Expand Down