avoid providing absolute path in Tablet XML file
songweizhi opened this issue · 8 comments
Hi,
Is it possible to use the path of the Tablet XML file as path to the assembly and reference files by default in the XML file.
Thanks,
Weizhi
Sorry, I'm not sure what you mean by this. Can you explain in a bit more detail, please?
Thanks for your reply, Iain.
I need to generate hundreds of sam files for visualisation in my program. So opening them in Tablet with the XML file will make life easier for my users.
However, In the XML file, I need to provide full path to the sam and reference files (as show below). If I changed the location of the sam and reference files, the corresponding XML won't work.
<tablet>
<assembly>/full/path/to/Example4.sam</assembly>
<reference>/full/path/to/Example4.fasta</reference>
</tablet>
I just wondering is it possible to avoid providing absolute path in the XML file (like below). One possible solution is to prepare one XML file (e.g. Example4.tablet) for each pair of sam and reference files, and put them in the same folder.
Tablet can by default looking for the specified files in the folder where the XML is in.
<tablet>
<assembly>Example4.bam</assembly>
<reference>Example4.fasta</reference>
</tablet>
please let me know if I haven't make it clear.
Thanks,
Weizhi
I'm only guessing here (I'll take a proper look at the code later) that it probably does open files with relative paths, but it probably treats them as relative to where Tablet was launched from, rather than to the location of the XML file itself. I think Tablet's working directory defaults to where it was installed...try placing a file there and see if it opens it ok? I know that's not a solution, but it'll help me work out what's happening...
Hi Iain,
I just tested it on Mac system, it works if I put the sam and reference files in '/Applications/Tablet.app/'. all other locations (including home, the XML file folder) won't work.
Cheers,
Weizhi
Hi Iain,
Once you have done the updates, could you please share with me a beta version of the next release? I am currently developing a pipeline to link Metagenome-assembled genomes to 16S sequences and need to check reads mapping quite often. such a feature would be really helpful.
Thanks,
Weizhi
Yes, I'll share any beta code once it's ready, but I can't promise when I'll find the time to work on this - hopefully v soon though.
Drop http://bioinf.hutton.ac.uk/tablet/beta/tablet.jar into Tablet's lib folder (on a mac it'll be somewhere inside of that /Applications/Tablet.app/ structure) and let me know how you get on?
It works perfect, Thank you so much Iain !!!
Btw, this is the place where I put tablet.jar : /Applications/Tablet.app/Contents/java/app/lib/