Skip to content

Commit

Permalink
add cram support (#1908, #1914)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Feb 28, 2024
1 parent 33534cb commit 5cf31c7
Show file tree
Hide file tree
Showing 18 changed files with 470 additions and 77 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Added
- UI tests for project details card (#1902)
- **Samplesheets**
- ``IrodsDataRequest`` timeline event extra data (#1912)
- CRAM file support in study apps (#1908)
- ``check_igv_file_suffix()`` helper in ``studyapps.utils`` (#1908)
- **Taskflowbackend**
- Django settings in siteinfo (#1901)
- ``BatchSetAccessTask`` in iRODS tasks (#1905)
Expand Down Expand Up @@ -64,6 +66,7 @@ Fixed
- ``IrodsDataRequest._validate_action()`` failing with ``delete`` action (#1858)
- Protocol ref editable for new row if disabled in column config (#1875)
- Sheet template creation failure with slash characters in title/ID fields (#1896)
- ``get_pedigree_file_path()`` used in cancer study app tests (#1914)
- **Taskflowbackend**
- Hardcoded iRODS path length in ``landing_zone_move`` (#1888)
- Uncaught exceptions in ``SetAccessTask`` (#1906)
Expand Down
4 changes: 2 additions & 2 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,11 +807,11 @@ def set_logging(level=None):
# Remote sample sheet sync interval in minutes
SHEETS_SYNC_INTERVAL = env.int('SHEETS_SYNC_INTERVAL', 5)

# BAM file name suffixes to omit from study shortcuts and IGV session generation
# BAM/CRAM file name suffixes to omit from study shortcuts and IGV sessions
SHEETS_IGV_OMIT_BAM = env.list(
'SHEETS_IGV_OMIT_BAM', default=['dragen_evidence.bam']
)
# VCF file name suffixes to omit from study shortcuts and IGV session generation
# VCF file name suffixes to omit from study shortcuts and IGV sessions
SHEETS_IGV_OMIT_VCF = env.list(
'SHEETS_IGV_OMIT_VCF', default=['cnv.vcf.gz', 'ploidy.vcf.gz', 'sv.vcf.gz']
)
Expand Down
2 changes: 1 addition & 1 deletion docs_manual/source/admin_settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Sample Sheets Settings
``SHEETS_SYNC_INTERVAL``
Interval for remote sheet synchronization in minutes (integer).
``SHEETS_IGV_OMIT_BAM``
BAM file name suffixes to omit from study shortcuts and IGV session
BAM and CRAM file name suffixes to omit from study shortcuts and IGV session
generation.
``SHEETS_IGV_OMIT_VCF``
VCF file name suffixes to omit from study shortcuts and IGV session
Expand Down
8 changes: 4 additions & 4 deletions docs_manual/source/ext_tool_igv_opening.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ The IGV session can be opened replacing the currently open session in IGV.
Another option is to merge the session into the currently open one with the
button displaying a plus icon.

BAM and VCF files can be similarly loaded into the currently open IGV session by
clicking the corresponding button with a plus icon.
BAM/CRAM and VCF files can be similarly loaded into the currently open IGV
session by clicking the corresponding button with a plus icon.

.. image:: _static/ext_tool_igv/IGV_Study_Shortcuts.png
:width: 75%
Expand All @@ -49,8 +49,8 @@ Obtaining File URLs
You can also obtain URLs into the SODAR file serving sub system.

The donor or pedigree names in the IGV links window depicted above link directly
to the BAM and VCF files in the file serving sub system. Right-click the link
and use the "copy link location" context menu entry to copy the File URL.
to the BAM/CRAM and VCF files in the file serving sub system. Right-click the
link and use the "copy link location" context menu entry to copy the File URL.

You can then open this link in IGV using the "File" > "Load from URL" command.
Paste the URL that you just copied into the "File URL" field of the window that
Expand Down
2 changes: 1 addition & 1 deletion docs_manual/source/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Notable Features
* Sample sheet generation from templates
* Sample sheet editing and version control
* Sample sheet export in ISA-Tab and Excel formats
* Automated iRODS shortcut generation for e.g. BAM/VCF files
* Automated iRODS shortcut generation for BAM/CRAM/VCF files
* Automated Integrative Genomics Viewer (IGV) session file generation and
merging
* Track hub management for UCSC Genome Browser integration
Expand Down
13 changes: 8 additions & 5 deletions docs_manual/source/metadata_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ SODAR currently supports the following study configurations:
- **Cancer**
* Indended for: Cancer studies
* Configuration: ``bih_cancer``
* Provides: **sample specific** shortcuts to the latest BAM and VCF files.
* Provides: **sample specific** shortcuts to the latest BAM/CRAM and VCF
files.
- **Germline**
* Indended for: Germline studies
* Configuration: ``bih_germline``
* Provides: **pedigree specific** shortcuts to the latest BAM and VCF files.
* Provides: **pedigree specific** shortcuts to the latest BAM/CRAM and VCF
files.

If the configuration is not specified or is not known to SODAR, the shortcut
column will not be visible.
Expand All @@ -44,11 +46,12 @@ Placement of files in subcollections under the row-specific collection does not
affect study shortcuts or IGV session inclusion. This also means files can be
freely organized within desired subcollections.

If there is need to omit BAM or VCF files with certain file name patterns from
shortcuts and IGV sessions, file name suffixes can be defined in the
If there is need to omit BAM/CRAM or VCF files with certain file name patterns
from shortcuts and IGV sessions, file name suffixes can be defined in the
:ref:`project update view <ui_project_update>`. Administrators can also define
site-wide file suffixes to omit via :ref:`Django settings <admin_settings>`
under ``SHEETS_IGV_OMIT_BAM`` and ``SHEETS_IGV_OMIT_VCF``.
under ``SHEETS_IGV_OMIT_BAM`` (also affects CRAM files) and
``SHEETS_IGV_OMIT_VCF``.


Assay iRODS Data Linking
Expand Down
12 changes: 12 additions & 0 deletions docs_manual/source/sodar_release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ v0.14.2 (WIP)

Release for minor updates, maintenance and bug fixes.

- Add CRAM file support for cancer/germline study links and IGV sessions
- Add assay plugin shortcut collection creation in landing zones
- Add iRODS data request details in timeline events
- Add landing zone statistics in siteinfo
Expand All @@ -25,6 +26,17 @@ Release for minor updates, maintenance and bug fixes.
- Minor updates and bug fixes
- Upgrade to SODAR Core v0.13.4

Migration Guide
---------------

CRAM File Support
This release adds support for CRAM files. They are linked in studies and IGV
sessions similar to BAM files. If your project contains CRAM files uploaded
prior to this release, you will have to run :guilabel:`Update Sheet Cache`
in the Sample Sheets app to enable the files in study links and generated
IGV sessions. Alternatively, an administrator can run the ``synccache``
management command to update all projects or a specific project.


v0.14.1 (2023-12-12)
====================
Expand Down
6 changes: 3 additions & 3 deletions docs_manual/source/ui_project_update.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ Token for Sheet Synchronization
IGV session genome
Genome used in generating IGV session files for the project. The name needs
to be in a format accepted by IGV. Affects cancer and germline projects.
BAM files to omit from IGV sessions
Comma separated list of BAM file suffixes to omit from IGV sessions.
Overrides site-wide setting, affects cancer and germline projects.
BAM and CRAM files to omit from IGV sessions
Comma separated list of BAM and CRAM file suffixes to omit from IGV
sessions. Overrides site-wide setting, affects cancer and germline projects.
VCF files to omit from IGV sessions
Comma separated list of VCF file suffixes to omit from IGV sessions.
Overrides site-wide setting, affects cancer and germline projects.
Expand Down
8 changes: 4 additions & 4 deletions samplesheets/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ class ProjectAppPlugin(
'igv_omit_bam': {
'scope': SODAR_CONSTANTS['APP_SETTING_SCOPE_PROJECT'],
'type': 'STRING',
'label': 'BAM files to omit from IGV sessions',
'label': 'BAM and CRAM files to omit from IGV sessions',
'default': '',
'placeholder': ', '.join(settings.SHEETS_IGV_OMIT_BAM),
'description': 'Comma separated list of BAM file suffixes to omit '
'from generated IGV sessions. Overrides site-wide setting, affects '
'cancer and germline projects.',
'description': 'Comma separated list of BAM and CRAM file suffixes '
'to omit from generated IGV sessions. Overrides site-wide setting, '
'affects cancer and germline projects.',
'user_modifiable': True,
},
'igv_omit_vcf': {
Expand Down
8 changes: 4 additions & 4 deletions samplesheets/studyapps/cancer/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ def get_shortcut_column(self, study, study_tables):
'files': {
'type': 'modal',
'icon': 'mdi:folder-open-outline',
'title': 'View links to BAM, VCF and IGV session files '
'for the case',
'title': 'View links to BAM/CRAM, VCF and IGV session '
'files for the case',
},
},
'data': [],
Expand Down Expand Up @@ -172,7 +172,7 @@ def get_shortcut_links(self, study, study_tables, **kwargs):
'title': 'Case-Wise Links for {}'.format(case_id),
'data': {
'session': {'title': 'IGV Session File', 'files': []},
'bam': {'title': 'BAM Files', 'files': []},
'bam': {'title': 'BAM/CRAM Files', 'files': []},
'vcf': {'title': 'VCF Files', 'files': []},
},
}
Expand All @@ -190,7 +190,7 @@ def _add_lib_path(library_name, file_type):
'extra_links': [
{
'label': 'Add {} file to IGV'.format(
file_type.upper()
'BAM/CRAM' if file_type == 'bam' else 'VCF'
),
'icon': 'mdi:plus-thick',
'url': get_igv_irods_url(path, merge=True),
Expand Down
Loading

0 comments on commit 5cf31c7

Please sign in to comment.