Comments (2)
@corneliusroemer It seems that these values are undefined
, not empty strings.
Nextclade Web uses stable sort (order of equivalent entries is preserved) and empty (undefined
) values are not sorted, because we don't know how (JS might have some weird behavior from when it was slapped together hastily in 1992, but the correct computer-sciency way to say is that empty values are not comparable to strings). I tried to model the behavior for the well-known tabular software, such as Excel.
Consider this:
- you have fresh results from the Lapis link (perhaps fewer sequences, because 1000 is a bit too much to wait)
- you can sort by "Clade" column and all "outgroup" items will go to the top or bottom
- note that numbers in "i" column for "outgroup" entries have consecutive values - stable sort ensures that the order of values that all have equal "outgroup" clade is preserved the way it was before sort
- then if you subsequently sort by "Unaliased", the empty cells will stay at the bottom (or top), because we don't sort undefined values
Stable sort tries to preserve the existing order as much as possible and this allows you to sort/group by multiple criteria, for example by "outgoup" or not "outgroup" and then by lineage. Or you can first sort by lineage and then sort by clade - each clade group will then have lineages sorted within the clade. You can also try more than 2 criteria.
The fact that all "outgroup" entries have no lineage helps in this particular case, but technically it is a random coincidence. So if you think that we need to sort empty values, then we need to specify how. For example, we may consider them empty strings and if we sort lexicographically, they will be considered "less than" any other non-empty string.
I can also try and write another algorithm, but you'd need to specify it a little better than "sort misbehaves".
from nextclade.
I implemented sorting of empty values as empty strings in
#1152
@corneliusroemer please give it a try and tell me if this is the behavior you expected initially.
from nextclade.
Related Issues (20)
- How to decide if the reversionSubstitutions are valid variants or not and whether to keep them? HOT 2
- Direct Auspice SVG Download
- ENH: enlarge Visualization when more nucleotides/Codons even if mutations not fall in striclty adjacent codons but close enough to need a whole view. HOT 2
- Updating certain parts of the JSON file output from Map to Array HOT 2
- linux-musl artefact gets slower rather than faster when parallelizing in contrast to gnu HOT 5
- Parsing PCR primers HOT 2
- how many SARS-COV-2 sequences can nextclade handle in a MSA file? HOT 8
- Is there any example for handling HIV data? HOT 2
- Web crash: The target <seqName> could not be identified in the dom HOT 2
- Show "browser not supported HOT 1
- Show "browser not supported" modal only once per session HOT 3
- if the qc.overallStatus of my sequences are mediocre, can we keep them for next step analysis? HOT 5
- web-based nextclade issue when using another reference HOT 8
- web(minor): when customizing dataset files, it always says "pasted sequences" even if the field is for tree HOT 2
- I upload 1490 sequences to nextclade, and upload to auspice.us, why it shows me 4255 sequences? HOT 2
- Allow suppression of ` |(reverse complement)` suffix in header of alignment output HOT 2
- how many genomes can nextclade handle? HOT 1
- PCR primer mutation functionality[v3] HOT 13
- 3.0.0 version not retrieving RSV datasets HOT 1
- Can support be extended for SC2 Datasets V2 for another month? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextclade.