@@ -60,9 +60,77 @@ evidence by in JBrowse's linear synteny view.
6060
6161## How to add evidence tracks
6262
63+ Adding evidence tracks involves modifying the [ JBrowse configuration] ( jbrowse )
64+ served by Apollo. It can be done from the GUI or the CLI.
65+
66+ You'll need to provide a URL for the track data files when adding a track. It's
67+ common to serve these files from the same server you use to serve the JBrowse
68+ app files. See the
69+ [ deployment examples] ( ../installation/background#deployment-examples ) in the
70+ installation guide for more information.
71+
6372### Adding evidence tracks in the GUI
6473
74+ From the File menu, choose the "Open track..." menu item.
75+
76+ ![ File -> Open track menu] ( open_track_menu_item.png )
77+
78+ Enter the URL of the track (and optionally its index file) in the "Add a track"
79+ widget and click "Next." Note that local files will not work when saving to
80+ Apollo.
81+
82+ ![ Open track widget enter track data page] ( enter_track_data.png )
83+
84+ Confirm the track type and assembly, and optionally change the track name, in
85+ the "Add a track" widget and click "Add."
86+
87+ ![ Open track widget confirm track type page] ( confirm_track_type.png )
88+
89+ Now that the track is visible as a session track in JBrowes, open the track menu
90+ and select "Save track to Apollo." This will move the track out of the session
91+ tracks and store it in Apollo's JBrowse configuration.
92+
93+ ![ Track menu -> Save track to Apollo menu] ( save_track_to_apollo_menu_item.png )
94+
6595### Adding evidence tracks with the CLI
6696
6797For instructions on logging in before running these commands, see the
6898[ CLI guide] ( cli ) .
99+
100+ If you have more than one assembly, you'll first need to figure out the assembly
101+ name that JBrowse uses internally for your assembly. One way to find this out is
102+ to run this command.
103+
104+ ``` sh
105+ apollo assembly get
106+ ```
107+
108+ In the output, you want the ` _id ` field of the assembly. You can get this
109+ programaticallyi using ` jq ` like this.
110+
111+ ``` sh
112+ MANSONI_ID=$(
113+ apollo assembly get |
114+ jq --raw-output ' .[] | select(.name=="Schistosoma mansoni")._id'
115+ )
116+ ```
117+
118+ You'll then need to retrieve a copy of the JBrowse ` config.json ` from Apollo.
119+ See the [ JBrowse guide] ( jbrowse#how-to-edit-the-jbrowse-configjson ) for how to
120+ do that. Once you have the ` config.json ` , you can use the
121+ [ JBrowse CLI] ( https://jbrowse.org/jb2/docs/cli/ ) to add the evidence tracks.
122+
123+ ``` sh
124+ jbrowse add-track \
125+ https://mysite.com/genes.gff.gz \
126+ --name " Gene models" \
127+ --assemblyNames " ${MANSONI_ID} "
128+ ```
129+
130+ See the
131+ [ docs for the ` add-track ` command] ( https://jbrowse.org/jb2/docs/cli/#jbrowse-add-track )
132+ for more options.
133+
134+ After adding the evidence tracks, follow the steps in the
135+ [ JBrowse guide] ( jbrowse#how-to-edit-the-jbrowse-configjson ) to load the updated
136+ configuration into Apollo.
0 commit comments