Closed njbowen closed 4 years ago
Hey Nathan,
'rsvg-convert' is installed along with rsvg when you install the lib package. Depending on your operating system, may have to specify 'librsvg2' when using the package manager. What does "which rsvg" return?
Also libsvg and librsvg are different packages, could you double check which one you installed?
which rsvg won't return anything. that's the thing. I can't get it installed. I'll try librsvg2 again. how do you recommend via brew? conda? thanks so much.
The Homebrew one looks a little janky. I know the conda package definitely works, it's how I use Tagore
says librsvg is installed but still get rsvp error. "which rsvp" still no return. not sure how to specify librsvg2 with package manager.
do you run Tagore on a Mac or on another unix platform?
it appears that calling rsvg directly was replaced with rsvg-convert in current installations of librsvg? does that seem possible to you? thanks.
We tend to run everything on Unix systems (generally CentOS and Ubuntu).
Can you try using this version of the Tagore script? https://raw.githubusercontent.com/jordanlab/tagore/rsvg-convert/tagore.py
Will do ASAP, prob by after 1:30p today. Thanks so much.
The new .py does appear to work. It produces an out.svg file from the test.bed file.
here's the command and output
it writes out.svg into the working folder I opened it with Inkscape and it looks fine.
$ python ./tagore.py -i example_ideogram/test.bed
Multiple SVG files are only allowed for PDF and (E)PS output.
Traceback (most recent call last):
File "./tagore.py", line 249, in
ut(f"{rsvg} {ARGS.prefix}.svg {ARGS.prefix}.png", shell=True) File "/Users/nbowen/miniconda3/lib/python3.7/subprocess.py", line 395, in check_output **kwargs).stdout File "/Users/nbowen/miniconda3/lib/python3.7/subprocess.py", line 487, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command 'rsvg-convert out.svg out.png' returned non-zero exit status 1.
Interesting. Let me dig in to the new rsvg commands
and is there an option to draw 2 X's or am I missing it somehow? here's a whole genome paint where I'm painting one haplotype with red and one haplotype with blue depending on the overall ancestry at that position in a group of admixed individuals. I converted the .svg to .png with Inkscape.
Tagore doesn't support X's, but you can do circles, triangles and lines at specific places.
I've just published a new version of Tagore on PyPi, could you pip install --upgrade tagore
and give that a try?
@njbowen Have you had a chance to try the new version?
didn't realize there was a new one since the rsvg-convert version. I used it and showed you the svg image above that was produced. is there an additional new version? I'll look now at the dates on your builds.
The newest version on PyPI (and Github) is similar to the one I linked to above and also supports exporting as PDF (-ofmt pdf) if you have rsvg-convert
available on your system. If the previous one worked fine then this one should too. I just want to double check 😄
yes, it worked. 2 comments:
in the more advanced example: tagore -input /example_ideogram/1KGP-MXL104_tagore.bed --prefix example_ideogram/1KGP-MXL104 --build hg37 --verbose
I had to change it to ./tagore --input or ./tagore -i
thanks, Nathan
oh, I got it. chr1 is one haplotype and chr2 is the other haplotype.
Thanks so much. Really appreciate it.
I'll get that typo fixed!
As for the rfmix example, rfmix paints the individual chromosome copies separately, so the chr1 file has chromosome copy 1 for all 22 chromosome and chr2 has copy 2 for all 22 chromosomes. The file names a little deceiving
getting: Could not find
rsvg
in PATH.I have libsvg installed, it seems to want to call rsvg-convert instead of just rsvg
any suggestions?
thanks,