Closed fpbarthel closed 5 years ago
Update aliquots:
UPDATE biospecimen.aliquots SET aliquot_barcode = 'GLSS-MD-0137-R1-01D-WGS-2AEXZ1', aliquot_portion = 1, sample_barcode = 'GLSS-MD-0137-R1' WHERE aliquot_barcode = 'GLSS-MD-LP09-R1-01D-WGS-2AEXZ1';
UPDATE biospecimen.aliquots SET aliquot_barcode = 'GLSS-MD-0137-TP-01D-WGS-L1K3MT ', aliquot_portion = 1, sample_barcode = 'GLSS-MD-0137-TP' WHERE aliquot_barcode = 'GLSS-MD-LP09-TP-01D-WGS-L1K3MT';
UPDATE biospecimen.aliquots SET aliquot_barcode = 'GLSS-MD-0137-NB-01D-WGS-C42CZJ', aliquot_portion = 1, sample_barcode = 'GLSS-MD-0137-NB' WHERE aliquot_barcode = 'GLSS-MD-LP09-NB-01D-WGS-C42CZJ';
UPDATE biospecimen.aliquots SET aliquot_barcode = 'GLSS-MD-0112-R1-01D-WGS-YG70ME', aliquot_portion = 1, sample_barcode = 'GLSS-MD-0112-R1' WHERE aliquot_barcode = 'GLSS-MD-LP20-R1-01D-WGS-YG70ME';
UPDATE biospecimen.aliquots SET aliquot_barcode = 'GLSS-MD-0112-TP-01D-WGS-WIQ0DD', aliquot_portion = 1, sample_barcode = 'GLSS-MD-0112-TP' WHERE aliquot_barcode = 'GLSS-MD-LP20-TP-01D-WGS-WIQ0DD';
UPDATE biospecimen.aliquots SET aliquot_barcode = 'GLSS-MD-0112-NB-01D-WGS-CDM1PT', aliquot_portion = 1, sample_barcode = 'GLSS-MD-0112-NB' WHERE aliquot_barcode = 'GLSS-MD-LP20-NB-01D-WGS-CDM1PT';
Turns out that for MD-0112
there is no TP
sample and in fact R2
represents the primary.
UPDATE biospecimen.aliquots SET aliquot_barcode = 'GLSS-MD-0112-R2-01D-WGS-WIQ0DD', aliquot_portion = 1, sample_barcode = 'GLSS-MD-0112-R2' WHERE aliquot_barcode = 'GLSS-MD-LP20-TP-01D-WGS-WIQ0DD';
Note: obviously this is a temporary fix and should be fixed later.
Done
It turns out
MD-LP09
andMD-0137
are in fact the same patient, as well asMD-LP20
andMD-0112
. We now need to consolidate all their data into the same patient barcode.Affected aliquots:
To-Do:
biospecimen.aliquots
table to change barcodesLP09
andLP20
fromclinical.cases
samtools view -H OLDBAM | sed -e 's/SM:OLDBARCODE/SM:NEWBARCODE/' | samtools reheader - OLDBAM > NEWBAM
analysis.files
table to updatealigned BAM
file records to match updated file name and path, new file size and md5