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

Customizing the plot #19

Open
c4cactus opened this issue Jun 18, 2020 · 5 comments
Open

Customizing the plot #19

c4cactus opened this issue Jun 18, 2020 · 5 comments

Comments

@c4cactus
Copy link

Howdy!

It is a question rather than an issue. I'd like to customize the PDF plot, to be specific:

  1. Is there an option to remove the number label on "Split Reads" track on the PDF plot?

  2. Do not plot the intra-gene lines (grey color).

Is there a "-p" flag for such options? Otherwise possible to change the code? I would expect changing fst_plot.r most likely can do the magic, while my R experience is minimal.

Thanks,
Ray

@breons
Copy link
Contributor

breons commented Jun 18, 2020

Hi Ray, let's see what we can do!

I think you're right in that we could change fst_plot.r first, after which I can then implement parameters on the command line for future use.

Try this mod, it should be able to resolve both (I haven't had a chance to test it). Try changing the highlight track from line 569-579 to:

	# Overlay both splice junction and fusion breakpoint track
	sashimi_plot <- OverlayTrack(
		trackList = list(
			fusion_breakpoint_track
		), 
		background.title =  track_colours[9], 
		name = "Split Reads", 
		col.axis="transparent",
                col.title="transparent"
     )

Let me know how that goes!

@c4cactus
Copy link
Author

Thanks Breon,

The following error came up, looks like more changes required,

================================== Stage plot_fusion (SeraseqV4) ===================================
[1] "Plotting: FGFR3:TACC3"
[1] "------------------------------------------------------"
[1] "Libraries and ancillary files loaded. Creating Tracks."
Error in list(fusion_breakpoint_track, ) : argument 2 is empty
Calls: prepare -> create -> OverlayTrack
In addition: Warning message:
In if (annotations$proteins != FALSE) { :
the condition has length > 1 and only the first element will be used
Execution halted
ERROR: stage plot_fusion failed: Command in stage plot_fusion failed with exit status = 1 :

Rscript /opt/tools/Clinker/plotit/fst_plot.r /opt/tools/Clinker/test_J2PRT/output_Rmod FGFR3:TACC3 /opt/tools/Clinker/test_J2PRT/output_Rmod/alignment/SeraseqV4_40ng_1_umi_dedup/FGFR3_TACC3 9 16 1,3,1,2,4,2 /opt/tools/Clinker/test_J2PRT/output_Rmod/alignment/SeraseqV4_40ng_1_umi_dedup SeraseqV4_40ng_1_umi_dedup 6e65ad,3983AA,2b749a,f05f3b,a1d16e,f2ffe4,215A4A,D7D4E4,6e65ad,ff6d6d axis,coverage,gene,domain,transcript,sashimi 2

@breons
Copy link
Contributor

breons commented Jul 16, 2020

Sorry about the delay!

Hopefully this is an easy one. If you return to fst_plot.r and navigate to lines 569-579 can you check whether there is a comma after fusion_breakpoint_track? i.e. list(fusion_breakpoint_track, ) should be list(fusion_breakpoint_track) if that error is accurate.

Let me know how you go :).

@c4cactus
Copy link
Author

Yes you are right! Should have noticed the extra comma, my bad.

One more question, where does the number label (301 in screenshot) come from? Basically we want to replace this number with the fusion caller output for junction read count.
image

@breons
Copy link
Contributor

breons commented Jul 21, 2020

Hmmm, good question. Clinker doesn't have a mechanism for changing that number directly at the moment.

That number is generated by one of the libraries that Clinker depends on for visualisation (GViz). Looking at the source code for GViz, it appears that they get that number using the 'summarizeJunctions` function in another library called GenomicAlignments. Dependencies upon dependencies!

The number that this shows vs. your fusion caller output is likely to be a bit different (I think perhaps even more support should be shown?) as you are aligning to a different reference (the superTranscript!).

Regardless, how does one manually update that number? I think the easiest solution is to use something like Adobe Acrobat/Photoshop or Inkscape/GIMP on the final figure to reflect the numbers in your fusion caller output. Adding it as a function in Clinker might take some looking into.

Let me know if that helps!

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

No branches or pull requests

2 participants