Hello,
I wrote a custom import function for the DataTrack constructor in Gviz (detailed here) to allow visualisation of stranded RNAseq data. In that example I hard coded the library orientation but would now like to provide an additional argument to the custom import function that specifies the library orientation.
However, I can't seem to pass additional arguments to the custom function e.g. these both fail (where strandedBamImport is the custom function and libType is the additional argument):
dataTrack = DataTrack(bamFile, genome="hg19", chromosome=myChr, importFunction=strandedBamImport, libType="fr-firststrand", stream=TRUE)
and
dataTrack = DataTrack(bamFile, genome="hg19", chromosome=myChr, importFunction=strandedBamImport(libType="fr-firststrand"), stream=TRUE)
Other than setting a global variable, is there a way around this that I am missing?