GMOD / jbrowse-components

Source code for JBrowse 2, a modern React-based genome browser
https://jbrowse.org/jb2
Apache License 2.0
205 stars 61 forks source link

Allow setting sequenceType='pep' in ReferenceSequenceTrack configuration #4533

Closed cmdcolin closed 1 month ago

cmdcolin commented 1 month ago

This is a manually configured setting (e.g. not auto-detected from the fasta file) that lets a user configure a reference sequence to have a non-dna sequence type

This, if sequenceType!=='dna', then it disables the showTranslation/showForward/showReverse settings on the sequence track, and the "DNA coloring scheme" for the sequence letters. This works well for making a protein type browser

example screenshot

image

example config

{
      "name": "P05067",
      "sequence": {
        "type": "ReferenceSequenceTrack",
        "trackId": "P05067-ReferenceSequenceTrack",
        "sequenceType": "pep", <-- this line
        "adapter": {
          "type": "UnindexedFastaAdapter",
          "fastaLocation": {
            "uri": "https://rest.uniprot.org/uniprotkb/P05067.fasta"
          }
        }
      }
    }
cmdcolin commented 1 month ago

of course, one could consider adding 'protein coloring schemes' on the reference sequence track, but there are many of these....

see also this related PR showing some protein browser demo data fetched from uniprot https://github.com/GMOD/jbrowse-plugin-protein3d/pull/14