Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Specify an output sort order in FilterConsensusReads #782
Specify an output sort order in FilterConsensusReads #782
Changes from 2 commits
610b100
a5a150a
1129b9a
0cd6d67
d495fd4
7ccc2b7
0c8b5fb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 can't comment on the tool usage, but you seemed to miss my top-level review comment last time, so I'm replicating it here:
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 can't comment on the line below, but I wonder if in Bams.templateIterator (or rather Bams.queryGroupedIterator that is calls) we should think about trying to auto-detect query-grouping by looking at say the first 100 records if the sort order and group order are both null? Could be a separate PR, but would be nice to avoid sorting more.
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.
In this tool though it might be nice to test for query grouped or sorted and emit a warning that it is preferable to supply this tool query-grouped data and defer sorting until after?
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.
Leaving it as is. See #799
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.
Why you remove my
{}
?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.
don't need it, and IntelliJ is making it a game to get rid of the warnings
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.
So ... IntelliJ is not the boss of us. Put cursor into warning, option-enter, disable inspection.
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 really do think that Intellij is wrong on this. Since braces become necessary the moment the expression becomes more than a simple variable reference (e.g.
${masedBases / totalBases}
) and the fact that braces make it much clearer where the expression ends, I try to use them 100% of the time, and would certainly prefer they not get removed.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 don't think this will work as intended in all cases. Because we don't have
SamOrder
objects that have e.g.sort=unknown, group=query
, it won't find aSamOrder
if the header has that combination, and so this will fall to the default branch and assume sorting to queryname was done.I think it's safer and simpler to just check
if (inHeader.getSortOrder == SortOrder.queryname || inHeader.getGroupOrder == GroupOrder.queryname)
. And possibly we should extract this check intoBams
or elsewhere so it's the same check that is used inBams.templateIterator
?Or for extra credit, we could make a new iterator type in Bams that has a flag that just tells you whether the data got sorted or not to generate your iterator.
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 think this will have to become a slightly more complicated check
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 think that in order to test more combinations it would be better to take
inSort
andinGroup
separately asSamOrder
has a limited set of combinations.