atacseq icon indicating copy to clipboard operation
atacseq copied to clipboard

relative paths in IGV session (igv_session.xml)

Open gorgitko opened this issue 3 years ago • 1 comments

Hello,

I've just noticed that IGV doesn't like dots in relative paths in igv_session.xml 🧐 The session is normally loaded, but saving throws the "popular" Java NullPointerException.

So here is the original session file located in results/igv/narrowPeak:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Session genome="../../genome/Canis_lupus_familiarisbasenji.Basenji_breed-1.1.dna.toplevel.fa" hasGeneTrack="true" hasSequenceTrack="true" locus="All" version="8">
	<Resources>
		<Resource path="../../bwa/mergedReplicate/bigwig/E322K_MDCK.mRp.clN.bigWig"/>
		<Resource path="../../bwa/mergedReplicate/macs/narrowPeak/E322K_MDCK.mRp.clN_peaks.narrowPeak"/>
	</Resources>
	<Panel height="1160" name="DataPanel" width="1897">
		<Track altColor="0,0,178" autoScale="true" clazz="org.broad.igv.track.DataSourceTrack" color="0,0,178" displayMode="COLLAPSED" featureVisibilityWindow="-1" fontSize="10" height="30" id="../../bwa/mergedReplicate/bigwig/E322K_MDCK.mRp.clN.bigWig" name="E322K_MDCK.mRp.clN.bigWig" normalize="false" renderer="BAR_CHART" sortable="true" visible="true" windowFunction="mean">
			<DataRange baseline="0.0" drawBaseline="true" flipAxis="false" maximum="10" minimum="0.0" type="LINEAR"/>
		</Track>
		<Track altColor="0,0,178" autoScale="false" clazz="org.broad.igv.track.FeatureTrack" color="0,0,178" displayMode="SQUISHED" featureVisibilityWindow="-1" fontSize="10" height="20" id="../../bwa/mergedReplicate/macs/narrowPeak/E322K_MDCK.mRp.clN_peaks.narrowPeak" name="E322K_MDCK.mRp.clN_peaks.narrowPeak" renderer="BASIC_FEATURE" sortable="false" visible="true" windowFunction="count"/>
</Panel>
</Session>

When I copy it to results/ and remove the leading ../../:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Session genome="genome/Canis_lupus_familiarisbasenji.Basenji_breed-1.1.dna.toplevel.fa" hasGeneTrack="true" hasSequenceTrack="true" locus="All" version="8">
	<Resources>
		<Resource path="bwa/mergedReplicate/bigwig/E322K_MDCK.mRp.clN.bigWig"/>
		<Resource path="bwa/mergedReplicate/macs/narrowPeak/E322K_MDCK.mRp.clN_peaks.narrowPeak"/>
	</Resources>
	<Panel height="1160" name="DataPanel" width="1897">
		<Track altColor="0,0,178" autoScale="true" clazz="org.broad.igv.track.DataSourceTrack" color="0,0,178" displayMode="COLLAPSED" featureVisibilityWindow="-1" fontSize="10" height="30" id="bwa/mergedReplicate/bigwig/E322K_MDCK.mRp.clN.bigWig" name="E322K_MDCK.mRp.clN.bigWig" normalize="false" renderer="BAR_CHART" sortable="true" visible="true" windowFunction="mean">
			<DataRange baseline="0.0" drawBaseline="true" flipAxis="false" maximum="10" minimum="0.0" type="LINEAR"/>
		</Track>
		<Track altColor="0,0,178" autoScale="false" clazz="org.broad.igv.track.FeatureTrack" color="0,0,178" displayMode="SQUISHED" featureVisibilityWindow="-1" fontSize="10" height="20" id="bwa/mergedReplicate/macs/narrowPeak/E322K_MDCK.mRp.clN_peaks.narrowPeak" name="E322K_MDCK.mRp.clN_peaks.narrowPeak" renderer="BASIC_FEATURE" sortable="false" visible="true" windowFunction="count"/>
</Panel>
</Session>

IGV now saves the session without errors.

I would suggest copying results/igv/narrowPeak/igv_session.xml to results/igv_session_narrowPeak.xml (and similarly for broadPeak) while removing the ../../.

Anyway thanks for this pipeline, it's awesome! 😍

gorgitko avatar Mar 05 '21 11:03 gorgitko

I encountered the same issue and this solution works for me. A great pipeline and a great community.

chaochungkuo avatar Sep 24 '21 12:09 chaochungkuo

Thanks for reporting! It is weird since I tried to open the IGV session using the xml file with the dots and had any issues. It might be related to the version of IGV or not having the fasta file available in the path by using the --save_reference parameter. I'll close the issue now and if you find this problem again please let us know together with the IGV version.

JoseEspinosa avatar Nov 15 '22 09:11 JoseEspinosa