iCLIP.getters.make_getter

iCLIP.getters.make_getter(bamfile=None, plus_wig=None, minus_wig=None, bedfile=None, profile='iclip', **kwargs)

A factory for getter functions

Parameters:
  • bamfile (str or pysam.AlignmentFile) – A bamfile to use to extract crosslinks
  • plus_wig (str) – Name of a BigWig file to use as either the unstranded signal, or the plus stranded signal. If no minus_wig is provided signal is assumed to be unstranded
  • minus_wig (str) – Name of a BigWig file to use as the minus strand signal
  • bedfile (str) – Name of a tabix indexed bed file to use to extract the crosslinks
  • profile (str) – Name of a predefined set of options that refer to a particular technique. Currently implemented are “iclip” (default), “iclip-centre”, “mNETseq-read1” and “mNETSeq-read2”. Only applys when getter is made from BAM.
  • extra keyword arguments (Common) –
  • ------------------------------
  • centre (bool) – Use the centre of the read rather than the base 5’ of the read end. Only applicable if using a bamfile to retrieve the signal.
  • read_end (bool) – Use 3’ end of read rather than 5’ end. Only applicable if using a bamfile to retrieve the signal.
  • use_deletions (bool) – Use a deletion in the read as the crosslink base. Only applicable if using a bamfile to retrieve the singal.
  • reverse_direction (bool) – Reverse the strand of the tag so that reads on the + strand add counts to the - strand and vice versa (usually combined with filter_end=”read2”
  • offset (int) – Report the base offset by this much from the end of the read. E.g. in iCLIP report the base BEFORE the start of the read
  • filter_end (None or str) – Filter reads so that only read1s or read2s are used.
Returns:

A getter() function that will retrieve the profile of crosslinks over a specified genomic interval.

Return type:

func

See also

getter()
Abstract interface for returning crosslink profiles over genomic

regions.()

Notes

At least one or bamfile or plus_wig must be provided. If kwargs are provided they override the settings from the profile

Todo

Implement for fetching from tabix indexed bedGraph files.