-
Notifications
You must be signed in to change notification settings - Fork 1
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
Extensive IGV Name Parameter #316
Conversation
Reviewing... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Minor comment to attend before merging. Pls request re-review whenever you are ready, pls.
* Ref: https://umccr.slack.com/archives/CP356DDCH/p1707116441928299?thread_ts=1706583808.733149&cid=CP356DDCH | ||
* | ||
* The desired outcome is to include libraryId, sampleId, type, and filetype | ||
* Desired output: SBJ00000_WGS_L0000000_PRJ00000_tumor.bam |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, sorry Will. Spec change a bit. Could you remove sample type
field, pls?
It should just be the SubjectID_LibraryID_
prepending only.
e.g. SBJ00000_L0000000_PRJ00000_tumor.bam
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry just thought I could go for an extra mile here to include the type. But, yes could follow what we agree on slack. Changing it ...
indexed: false, | ||
visibilityWindow: -1, | ||
removable: false, | ||
order: 1000000, | ||
infoURL: 'https://www.ncbi.nlm.nih.gov/gene/?term=$$', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nameArray.push(...findMatchingProperty('library_id')); | ||
|
||
// 3. sampleId + filetype | ||
nameArray.push(pathOrKey.split('/').pop() ?? pathOrKey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to discuss the logic a little bit here. Perhaps, we catchup tomorrow.
Especially for BAM case, we might not want to match library_id
from the path. The path pertaining two library_id
has other meaning as they belong to a single workflow run.
However, a BAM file only represents 1 sample; either tumor or normal. So, we need to extract sample_id
from the filename; strip tumor or normal (if exists); then using this sample_id
to exchange its library_id
counterpart from the subject meta/lims. So it is to be precise. It will be rather filter (or lookup) logic than reducing with accumulator on all possible library_id
matches infer from the path.
What you did here is; arguable not completely wrong either - especially when we switch to VCF context. But then, that open up even more complex handling where I'd rather ignore prefix for VCF all together. Only support BAM case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the change so only bam that will have the SBJ00000_L0000000_PRJ00000_tumor.bam
format while other filetype will only prepend the subjectId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great, Will! Let push it through to Staging.
{subjectId}_{type}_{libraryId}_filename.bam
for both IGV local and jsRef: Slack - Threads