nextstrain / auspice

Web app for visualizing pathogen evolution
https://docs.nextstrain.org/projects/auspice/
GNU Affero General Public License v3.0
291 stars 161 forks source link

Enable "copy IDs / strain names" for selected tips #1410

Open sidneymbell opened 2 years ago

sidneymbell commented 2 years ago

Context

Example use case / job story 1: "when I am looking at an outbreak cluster, I want to copy the names of closely related samples so I can go look them up" (without having to transcribe them by hand or zooming around to get the names to be visible and then copying them one-by-one)

Example use case / job story 2: "when I have new samples, I want to quickly find and record the most closely related samples so I can choose whether to specifically include those in my analysis." h/t to Alli for this initial idea :)

  1. Drag sample onto USHeR
  2. Get draft phylogenetic placement from USHeR and view in Auspice via the /fetch API
  3. Zoom to my sample of interest, select a subset of surrounding tips
  4. Copy the names of these samples so I can go fetch those specific sequences from GISAID for the next iteration of my analysis with augur

Possible solutions
Option 1 (more discoverable): add a "copy sample names" icon/button to the UI Option 2 (less discoverable): make this the default behavior of cmd+C when tips are selected

corneliusroemer commented 2 years ago

That's a great idea, thanks @sidneymbell! In fact I've had the same use cases/problems as you describe.

My workaround for now is to use this button at the very bottom in the footer to download Acknowledgements, but it's not very discoverable. Maybe this helps you alleviate the problem in some way?

Usher accepts the acknowledgement TSV, even though it's not just a list of strain names but also contains a bit of metadata.

image

image

sidneymbell commented 2 years ago

Yeah for sure! I point people here a lot :) Just a bit cumbersome, especially if I'm wanting to just snag a few strains at a time as I flip through the tree.

corneliusroemer commented 2 years ago

Ah great, at least now we have the workaround documented :)

I agree that it would be very nice to have an easier way to copy strain names. Don't see why clipboard shouldn't work, it's easy to add and there's nothing else we use ctrl+c for right now.

jameshadfield commented 2 years ago

Sounds like a good feature, and easy to implement. I'd suggest a UI where we add a small copy icon next to the header text Showing XX of YY genomes ... <copy icon/>. FOr instance, here's the icon GitHub uses:

image