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

Hide alignment tracks without reads for currently active reference #1809

Open
julibeg opened this issue May 14, 2024 · 1 comment
Open

Hide alignment tracks without reads for currently active reference #1809

julibeg opened this issue May 14, 2024 · 1 comment

Comments

@julibeg
Copy link

julibeg commented May 14, 2024

Hi there,

I am by no means an IGV or igv.js expert, so apologies in advance if there actually is a way to do this.

I have a reference with X sequences and X BAM files with each containing reads aligning against only one of the reference sequences. Therefore, all alignment tracks except for one are empty.

Is there a way to either

  • automatically hide alignment tracks if none of their reads are aligned to the currently active reference sequence
  • associate reference sequences to particular tracks so that only these tracks are visible when a specific reference is selected

Many thanks!

@jrobinso
Copy link
Contributor

Hi, no there is not. There is a concept of a "sharded" bam that can be configured as a single track. This was implemented for a specific use case and has a peculiar format, illustrated below. You BAM file names must be identical with the exception of the sequence name, which is represented by the token $CHR. The actual sequence name is substituted for this token anywhere it is found at runtime.

This is the igv.js answer, if you are asking about IGV desktop please open an issue there. There is a similar concept but will require some investigation on my part. These are rarely used options.

{
                        "name": "Sharded Bam",
                        "type": "alignment",
                        "sourceType": "shardedBam",
                        "sources": {
                            "sequences": [
                                "chr1",
                                "chr8"
                            ],
                            "url": "https://......$CHR.bam",
                            "indexURL": "https://...$CHR.bam.bai"
                        }
                    }

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

No branches or pull requests

2 participants