Controlling IGV through a PortIGV can optionally listen for http requests over a port. This option is turned off by default but can be enabled from the Advanced tab of the Preferences window. Note: IGV will write a response back to the port socket upon completion of each command. It is good practice to read this response before sending the next command. Failure to do so can overflow the socket buffer and cause IGV to freeze. See the example below for the recommended pattern. CommandsSee https://github.com/igvteam/igv/wiki/Batch-commands for complete list of port and batch commands. ExampleExample java code: Socket socket = new Socket("127.0.0.1", 60151);
out.println("load na12788.bam,n12788.tdf"); out.println("genome hg18"); out.println("goto chr1:65,827,301"); out.println("snapshotDirectory /screenshots"); out.println("snapshot"); |