Skip to content
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

wga bam files in Jbrowse config #27

Closed
adf-ncgr opened this issue Aug 17, 2023 · 6 comments
Closed

wga bam files in Jbrowse config #27

adf-ncgr opened this issue Aug 17, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@adf-ncgr
Copy link
Contributor

currently, the populate-jbrowse handles adding the paf files from genome_alignments but doesn't seem to add tracks for the associated bam files. Although the two files contain similar data, JBrowse2 only uses indexing with respect to the bam files, meaning that they are much faster to load when just looking at a linear genome view. So, I think we ought to make both available as tracks.

@ctcncgr ctcncgr added the enhancement New feature or request label Aug 18, 2023
ctcncgr added a commit that referenced this issue Aug 18, 2023
…le not just the PAF #27. added dotplot view #28. this should write in the resources section.
@adf-ncgr
Copy link
Contributor Author

seems like this isn't quite working. The error I get suggests that it is trying to assign the same track id to both the track representing the paf file and the one representing the bam file (which probably is because it is stripping off the .bam and .paf.gz suffixes to generate a track id). So, probably we'll have to explicitly set the track id for at least on of these. Maybe just using the filename without stripping off suffixes is as sensible as anything else I could imagine doing. For the record here's the full error:

 ›   Error: Cannot add track with id
 ›   arahy.Tifrunner.gnm2.x.aradu.V14167.gnm2.DWM1, a track with that id
 ›   already exists (use --force to override)
Traceback (most recent call last):
  File "/home/legumista/lis_autocontent_env/bin/lis-autocontent", line 33, in <module>
    sys.exit(load_entry_point('lis-autocontent==0.0.4', 'console_scripts', 'lis-autocontent')())
  File "/home/legumista/lis_autocontent_env/lib64/python3.10/site-packages/lis_autocontent-0.0.4-py3.10.egg/EGG-INFO/scripts/lis_autocontent.py", line 19, in cli_entry_point
  File "/home/legumista/lis_autocontent_env/lib64/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/legumista/lis_autocontent_env/lib64/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/legumista/lis_autocontent_env/lib64/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/legumista/lis_autocontent_env/lib64/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/legumista/lis_autocontent_env/lib64/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/legumista/lis_autocontent_env/lib64/python3.10/site-packages/lis_autocontent-0.0.4-py3.10.egg/EGG-INFO/scripts/lis_cli.py", line 157, in populate_jbrowse2
  File "/home/legumista/lis_autocontent_env/lib64/python3.10/site-packages/lis_autocontent-0.0.4-py3.10.egg/EGG-INFO/scripts/process_collections.py", line 204, in populate_jbrowse2
  File "/home/legumista/lis_autocontent_env/lib64/python3.10/site-packages/lis_autocontent-0.0.4-py3.10.egg/EGG-INFO/scripts/process_collections.py", line 194, in process_collections
  File "/usr/lib64/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'jbrowse add-track --assemblyNames aradu.V14167.gnm2,arahy.Tifrunner.gnm2 --out test/ https://data.legumeinfo.org/Arachis/hypogaea/genome_alignments/Tifrunner.gnm2.wga.DWM1/arahy.Tifrunner.gnm2.x.aradu.V14167.gnm2.DWM1.paf.gz --force;jbrowse add-track -a arahy.Tifrunner.gnm2 --indexFile https://data.legumeinfo.org/Arachis/hypogaea/genome_alignments/Tifrunner.gnm2.wga.DWM1/arahy.Tifrunner.gnm2.x.aradu.V14167.gnm2.DWM1.bam.bai https://data.legumeinfo.org/Arachis/hypogaea/genome_alignments/Tifrunner.gnm2.wga.DWM1/arahy.Tifrunner.gnm2.x.aradu.V14167.gnm2.DWM1.bam' returned non-zero exit status 160.

@adf-ncgr
Copy link
Contributor Author

@ctcncgr this is now technically working, although I'd like to see some further changes. At the moment the name/ids for a given comparison are as reported here:

Overwrote track with name "aradu.V14167.gnm2.x.araip.K30076.gnm2.96TT.paf" and trackId "aradu.V14167.gnm2.x.araip.K30076.gnm2.96TT.paf" in test//config.json
Overwrote track with name "araip.K30076.gnm2xaradu.V14167.gnm2 BAM" and trackId "aradu.V14167.gnm2.x.araip.K30076.gnm2.96TT" in ./config.json

One problem seen in the above is that the bam is getting written to ./config.json while the paf is getting written to test/config.json; the latter is correct, given that I had specified --jbrowse_out test

Another problem (somewhat cosmetic) is that the name for the bam track switches the order of the two genomes in the comparison (ie araip is coming first) and the separator should be ".x." not just "x". Also, I think for consistency we ought to just have the name end with ".bam" instead of " BAM" and the trackId should also have ".bam" added (similar to how the other one is using ".paf" in both these contexts).

I'll comment on dotplot stuff over on #28

ctcncgr added a commit that referenced this issue Aug 22, 2023
@ctcncgr
Copy link
Member

ctcncgr commented Aug 22, 2023

@adf-ncgr I think I fixed the naming inconsistencies and changed the order of the refs in the BAM.

@adf-ncgr
Copy link
Contributor Author

almost there, I think you just need to also add the .bam to the end of the trackId for the bam tracks; still coming out as the unsuffixed file name:
Overwrote track with name "aradu.V14167.gnm2.x.arast.V10309.gnm1.96TT.bam" and trackId "**aradu.V14167.gnm2.x.arast.V10309.gnm1.96TT**" in /var/www/html/jbrowse-web-v2.3.4/arachis/test//config.json

@ctcncgr
Copy link
Member

ctcncgr commented Aug 22, 2023

@adf-ncgr ok this should now set the trackId correctly.

@adf-ncgr
Copy link
Contributor Author

yes, I think it's good now, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants