infercnv question

296 views
Skip to first unread message

Michael Mariani

unread,
Jun 14, 2022, 3:17:03 PM6/14/22
to Trinity_CTAT_users
Hello, 

I am having success using infercnv for ~80k cells: ~40k normal and ~40k tumor. 
The program completed with 16 cores, 500GB mem, and 9.5 days on our cluster. No errors were thrown in my log file, and files appear to be output fine with the exception that some of the .pngs did not render (when I ran with 40k cells total, they rendered fine). 

Any ideas why this might happen?

Thank you 

Michael Mariani PhD
Geisel School of Medicine at Dartmouth College

cgeo...@broadinstitute.org

unread,
Jun 27, 2022, 4:35:57 PM6/27/22
to Trinity_CTAT_users
Hi Michael,

Based on your machine's config, I assume you are running this on a Linux server. On Linux, there are two common graphical backends, Xlib and Cairo. The later has limitation to the size of the figure overall but also to the size of the matrices that can be plot (at least the way its done in the R core methods), so any matrix bigger than 2^15 (~32k) cells or genes will make the whole figure become empty. The workaround is to have R use the other graphical backend, Xlib.

To do this you will need to do the following:
- ssh with the -X (X11 forwarding) or -Y option (trusted X11 forwarding), I use -Y
- run echo $DISPLAY to find out what it is set to
- within R, run Sys.setenv("DISPLAY"="result_of_previous_echo_display:with_the_port")
- within R, run options(bitmapType="Xlib")
- run infercnv (the whole analysis or just the plotting function on a reloaded object)

The 3rd step might not be needed if you run R directly after having ssh-ed, but if you use screen first, the $DISPLAY environment var is not transferred properly so you need to manually set it to the echoed value outside of screen in each new screen. Also note that the environment variable DISPLAY might change every time you ssh again, so you may need to rerun the steps each time to update it even within screen.

Regards,
Christophe.
Reply all
Reply to author
Forward
0 new messages