add new tracks to IGV server on the fly with php

use php files rather than xml files

if wanting to post bigwigs (bw) and bed files to IGV, place php file such as shown below into the directory where you add these bw and beds, then simply list these php files in your igv_registry.txt file!

<Global name="my_expts" version="1">
 <Category name="chip_seq">

 $dir = "./";
 $files = scandir($dir);
 foreach($files as $flname){
 if (preg_match("@.+\.(bw)$@i",$flname) |
 preg_match("@.+\.(bed)$@i",$flname)) {
 <Resource name="<?php echo($flname); ?>" 
  path="<?php echo($flname); ?>">


when you add files to the ‘chipseq’ directory, they will update to the IGV server menu automatically

Leave a Reply

Your email address will not be published. Required fields are marked *