igvteam / igv

Integrative Genomics Viewer. Fast, efficient, scalable visualization tool for genomics data and annotations
https://igv.org
MIT License
644 stars 387 forks source link

IGV preference setting is not working #177

Closed egafni closed 8 years ago

egafni commented 9 years ago

Environment is IGV v2.3.60 I'm launching IGV with -o /path/to/preferences, then sending the preference SAM.SHOW_SOFT_CLIPPED true via a port commands. IGV responds successful, and it works, but only the first time. The second time I send preference SAM.SHOW_SOFT_CLIPPED false IGV still responds successful but will not change its SHOW_SOFT_CLIPPED behavior.

egafni commented 9 years ago

Thanks for the prompt response - I just tried the nightly snapshot (from http://www.broadinstitute.org/software/igv/download_snapshot), but am still getting the same behavior

jrobinso commented 9 years ago

OK, I'll reopen and look again. In the meantime can you check your "prefs.properties" file to see if there is a setting for SAM.SHOW_SOFT_CLIPPED there?

egafni commented 9 years ago

Thanks! The port command "preference SAM.SHOW_SOFT_CLIPPED false|true" never gets written to the preference file.

p.s. If I launched igv with a preference file containing "SAM.SHOW_SOFT_CLIPPED true", soft clips will always be shown (even if I send preference SAM.SHOW_SOFT_CLIPPED false).

jrobinso commented 9 years ago

That's good that its not in the preferences file, just confirming. Could you outline the exact sequence of steps you are taking with nothing left out, because obviously we are following a different procedure to test this. Thanks.

egafni commented 9 years ago

I use this command to launch igv (note, that the application launches multiple IGVs on different ports):

java -Dproduction=true -Dapple.laf.useScreenMenuBar=true -Xmx1000m -Djava.net.preferIPv4Stack=true -jar /locus/opt/IGV/Snapshot_10-27-15/igv.jar -o /locus/home/egafni/.igvpool/prefs.properties_4951 -p 4951

Then I send the following port commands using python/sockets. Everything works except for setting the SHOW_SOFT_CLIPPED setting. I should also add that i'm running the IGVs in a headless state using Xvfb, although that doesn't seem like it would matter.

SEND: load aligned.bam
RECV: OK
SEND: snapshotDirectory /locus/home/egafni/.igvpool/imgs
RECV: OK
SEND: collapse
RECV: OK
SEND: maxPanelHeight 650
RECV: OK
SEND: goto 2:47669484-47669563
RECV: OK
SEND: preference SAM.SHOW_SOFT_CLIPPED true
RECV: OK
SEND: snapshot 115.png
RECV: OK
jrobinso commented 9 years ago

OK, but if that's all you do setting show soft clips to false should have no effect, since that is the default. Are you saying you still see soft clips after that? If you just start IGV and load the same file without any port commands do you see soft clips?

On 10/28/15 12:57 PM, Erik wrote:

I use this command to launch igv (note, that the application launches multiple IGVs on different ports): java -Dproduction=true -Dapple.laf.useScreenMenuBar=true -Xmx1000m -Djava.net.preferIPv4Stack=true -jar /locus/opt/IGV/Snapshot_10-27-15/igv.jar -o /locus/home/egafni/.igvpool/prefs.properties_4951 -p 4951

Then I send the following port commands using python/sockets

SEND: snapshotDirectory /locus/home/egafni/.igvpool/imgs RECV: OK SEND: collapse RECV: OK SEND: maxPanelHeight 650 RECV: OK SEND: goto 2:47669484-47669563 RECV: OK SEND: preference SAM.SHOW_SOFT_CLIPPED false RECV: OK SEND: snapshot 115.png RECV: OK

— Reply to this email directly or view it on GitHub https://github.com/igvteam/igv/issues/177#issuecomment-151971968.

egafni commented 9 years ago

That's right, sorry that was a bad example, I am also sending preference SAM.SHOW_SOFT_CLIPPED true, which results the same behavior (no soft clipped bases)

IGV will only show soft clips if I I have SAM.SHOW_SOFT_CLIPPED true in the preference file I start it with

jrobinso commented 9 years ago

Where is the bam file loaded? I don't see a load command.

egafni commented 9 years ago

It was done first, sorry - a bit scrambled right now, i'll edit it in

jrobinso commented 9 years ago

That's probably the issue. Setting the preference through the port probably isn't triggering a reset of the value in a specific track. It probably should, and will be treated as a bug, but until that's fixed you might try setting the soft clip before loading the bam. Of course if you want to take a snapshot with soft clips on and off for the same bam that is not helpful.

egafni commented 9 years ago

Thanks! Being able to turn it on/off would be really great.

Just FYI I am a bioinformatician at Invitae (clinical genetics diagnostics), and we're using the IGV port commands to rapidly cache and generate images of alignments in areas we want people to manually curate (we've generated 100s of thousands of images). I always find it nice to know what people are using my public software for, so just sharing in case you share the sentiment. :D

jrobinso commented 9 years ago

Yes, thanks for letting me know. And BTW, we are writing a grant for the continued development of IGV, one of the items called out in the grant is a major overhaul and enhancements for batch generation of images for precisely the purpose you are using them for. The current system is a bit of a kludge, I want to revamp it from the group up to be more robust and not need a display. It would be really helpful if you could send us an email-of-support saying basically what you have shared above, and how IGV is awemsome etc. Doesn't have to be long. You can send it to igv-los@broadinstitute.org. If you've already done so thanks!

egafni commented 9 years ago

Will do!

jrobinso commented 9 years ago

Thanks, this isn't a random request, clinical application is really important.

I'll get this bug fixed by the end of the week.

egafni commented 8 years ago

Hey @jrobinso, we would really appreciate any help getting this going, thanks!

jrobinso commented 8 years ago

Hi, sorry for the delay, this should be fixed now.