Download this file

124 lines (105 with data), 4.8 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
from singlecellmultiomics.modularDemultiplexer.baseDemultiplexMethods import UmiBarcodeDemuxMethod, NonMultiplexable
# NLAIII, 96 well format with 3bp UMI
class NLAIII_96w_c8_u3(UmiBarcodeDemuxMethod):
def __init__(self, barcodeFileParser, **kwargs):
self.barcodeFileAlias = 'lennart96NLA'
UmiBarcodeDemuxMethod.__init__(
self,
umiRead=0,
umiStart=0,
umiLength=3,
random_primer_read=1,
random_primer_length=6,
barcodeRead=0,
barcodeStart=3,
barcodeLength=8,
barcodeFileAlias=self.barcodeFileAlias,
barcodeFileParser=barcodeFileParser,
**kwargs)
self.shortName = 'NLAIII96C8U3'
self.longName = 'NLAIII, 96well CB: 8bp UMI: 3bp RP: 6bp'
self.autoDetectable = True
self.description = '96 well format. 3bp umi followed by 8bp barcode. R2 starts with a 6bp random primer'
# NLAIII, 384 well format with 3bp UMI
class NLAIII_384w_c8_u3(UmiBarcodeDemuxMethod):
def __init__(self, barcodeFileParser, **kwargs):
self.barcodeFileAlias = 'maya_384NLA'
UmiBarcodeDemuxMethod.__init__(
self,
umiRead=0,
umiStart=0,
umiLength=3,
barcodeRead=0,
barcodeStart=3,
barcodeLength=8,
random_primer_read=1,
random_primer_length=6,
barcodeFileAlias=self.barcodeFileAlias,
barcodeFileParser=barcodeFileParser,
**kwargs)
self.shortName = 'NLAIII384C8U3'
self.longName = 'NLAIII, 384well CB: 8bp UMI: 3bp RP:6bp'
self.autoDetectable = True
self.description = '384 well format. 3bp umi followed by 8bp barcode. R2 starts with a 6bp random primer'
def demultiplex(self, records, **kwargs):
if kwargs.get('probe') and records[0].sequence[self.barcodeLength + \
self.umiLength: self.barcodeLength + self.umiLength + 4] != 'CATG':
raise NonMultiplexable
taggedRecords = UmiBarcodeDemuxMethod.demultiplex(
self, records, **kwargs)
return taggedRecords
# NLAIII, 384 well format with 3bp UMI, single end, because? Why? Lets make ourselves unable to deduplicate IVT
class NLAIII_384w_c8_u3_SINGLE_END(UmiBarcodeDemuxMethod):
def __init__(self, barcodeFileParser, **kwargs):
self.barcodeFileAlias = 'maya_384NLA'
UmiBarcodeDemuxMethod.__init__(
self,
umiRead=0,
umiStart=0,
umiLength=3,
barcodeRead=0,
barcodeStart=3,
barcodeLength=8,
random_primer_read=None,
random_primer_length=None,
barcodeFileAlias=self.barcodeFileAlias,
barcodeFileParser=barcodeFileParser,
**kwargs)
self.shortName = 'NLAIII384C8U3SE'
self.longName = 'NLAIII, 384well CB: 8bp UMI: 3bp RP:6bp, single ended'
self.autoDetectable = True
self.description = '384 well format. 3bp umi followed by 8bp barcode. Single end: R2 is sadly missing'
def demultiplex(self, records, **kwargs):
if kwargs.get('probe') and records[0].sequence[self.barcodeLength + \
self.umiLength: self.barcodeLength + self.umiLength + 4] != 'CATG' or len(records)!=1:
raise NonMultiplexable
taggedRecords = UmiBarcodeDemuxMethod.demultiplex(
self, records, **kwargs)
return taggedRecords
class NLAIII_96w_c8_u3_SINGLE_END(UmiBarcodeDemuxMethod):
def __init__(self, barcodeFileParser, **kwargs):
self.barcodeFileAlias = 'lennart96NLA'
UmiBarcodeDemuxMethod.__init__(
self,
umiRead=0,
umiStart=0,
umiLength=3,
barcodeRead=0,
barcodeStart=3,
barcodeLength=8,
random_primer_read=None,
random_primer_length=None,
barcodeFileAlias=self.barcodeFileAlias,
barcodeFileParser=barcodeFileParser,
**kwargs)
self.shortName = 'NLAIII96C8U3SE'
self.longName = 'NLAIII, 96 well CB: 8bp UMI: 3bp RP:6bp, single ended'
self.autoDetectable = True
self.description = '96 well format. 3bp umi followed by 8bp barcode. Single end: R2 is missing'
def demultiplex(self, records, **kwargs):
if kwargs.get('probe') and records[0].sequence[self.barcodeLength + \
self.umiLength: self.barcodeLength + self.umiLength + 4] != 'CATG' or len(records)!=1:
raise NonMultiplexable
taggedRecords = UmiBarcodeDemuxMethod.demultiplex(
self, records, **kwargs)
return taggedRecords