Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: cubi-tk (isa-tab|sodar) add-ped is modifying previous Study Assay Data when --library-kit or --library-kit-catalogue-id is given #207

Closed
your-highness opened this issue Dec 6, 2023 · 3 comments · Fixed by #233
Assignees
Labels
bug Something isn't working

Comments

@your-highness
Copy link
Contributor

Describe the bug
When updating samplesheets for sodar project 25a57a17-9bee-44b5-aeca-c4a322b71f51 , I found that previous entries in Assay Data - which are not given in the pedifle - are wrongly set to library kit given by parameters --library-kit or --library-kit-catalogue-id . This wrongly alters columns Value[Library kit] and Comment[Library kit catalogue ID] in Assay Data.

When using only one of the parameters, only this column, i.e. Value[Library kit] or Comment[Library kit catalogue ID] , is wrongly updated in Assay Data. **This leads to inconsistencies of the columns!

When not using any of the parameters, no wrong updates are done.

To Reproduce

cubi-tk isa-tab add-ped \
  --batch-no 19 \
  --library-layout PAIRED \
  --library-type WES \
  --platform ILLUMINA \
  --instrument-model "Illumina NovaSeq 6000" \
  --library-kit-catalogue-id "S33266340" \
  --library-kit "Agilent SureSelect Human All Exon V8" \
  samplesheet/i_Investigation.txt v8.ped

or

cubi-tk sodar add-ped \
  --batch-no 19 \
  --library-layout PAIRED \
  --library-type WES \
  --platform ILLUMINA \
  --instrument-model "Illumina NovaSeq 6000" \
  --library-kit-catalogue-id "S33266340" \
  --library-kit "Agilent SureSelect Human All Exon V8" \
  25a57a17-9bee-44b5-aeca-c4a322b71f51 v8.ped

Expected behavior
Only add / update the samples given in the ped file!

Additional context
Example of wrong update diff with 2 parameters set (see changes in columns Value[Library kit] and Comment[Library kit catalogue ID] ):

Sample Name    Protocol REF    Parameter Value[Concentration measurement]      Performer       Date    Extract Name    Characteristics[Concentration]  Unit    Term Source REF Term Accession Number   Protocol REF    Parameter Value[Provider name]  Parameter Value[Provider contact]      Parameter Value[Provider project ID]    Parameter Value[Provider sample ID]     Parameter Value[Provider QC status]     Parameter Value[Requestor contact]      Parameter Value[Requestor project]      Parameter Value[Requestor sample ID]    Parameter Value[Concentration measurement]     Parameter Value[Library source] Parameter Value[Library strategy]       Parameter Value[Library selection]      Parameter Value[Library layout] Parameter Value[Library kit]    Comment[Library kit catalogue ID]       Parameter Value[Target insert size]    Parameter Value[Wet-lab insert size]    Parameter Value[Barcode kit]    Parameter Value[Barcode kit catalogue ID]       Parameter Value[Barcode name]   Parameter Value[Barcode sequence]       Performer       Date    Library Name    Characteristics[Folder name]   Characteristics[Concentration]  Unit    Term Source REF Term Accession Number   Protocol REF    Parameter Value[Platform]       Parameter Value[Instrument model]       Parameter Value[Base quality encoding]  Parameter Value[Center name]    Parameter Value[Center contact]        Performer       Date    Raw Data File
-LB20_2553-N1   Nucleic acid extraction WES                             LB20_2553-N1-DNA1                                       Library construction WES                                                                                GENOMIC WXS     Hybrid Selection      PAIRED   Agilent SureSelect Human All Exon V6r2  S07604514                                                                       LB20_2553-N1-DNA1-WES1  LB20-2553                                       Nucleic acid sequencing WES     ILLUMINA        Illumina NovaSeq 6000 Phred+33                                                                                                                                                                                                                                                                        
-LB21_0274-N1   Nucleic acid extraction WES                             LB21_0274-N1-DNA1                                       Library construction WES                                                                                GENOMIC WXS     Hybrid Selection      PAIRED   Agilent SureSelect Human All Exon V6r2  S07604514                                                                       LB21_0274-N1-DNA1-WES1  LB21-0274                                       Nucleic acid sequencing WES     ILLUMINA        Illumina NovaSeq 6000 Phred+33                                                                                                                                                                                                                                                                        
+LB20_2553-N1   Nucleic acid extraction WES                             LB20_2553-N1-DNA1                                       Library construction WES                                                                                GENOMIC WXS     Hybrid Selection      PAIRED   Agilent SureSelect Human All Exon V8    S33266340                                                                       LB20_2553-N1-DNA1-WES1  LB20-2553                                       Nucleic acid sequencing WES     ILLUMINA        Illumina NovaSeq 6000 Phred+33                                                                                                                                                                                                                                                                        
+LB21_0274-N1   Nucleic acid extraction WES                             LB21_0274-N1-DNA1                                       Library construction WES                                                                                GENOMIC WXS     Hybrid Selection      PAIRED   Agilent SureSelect Human All Exon V8    S33266340                                                                       LB21_0274-N1-DNA1-WES1  LB21-0274                                       Nucleic acid sequencing WES     ILLUMINA        Illumina NovaSeq 6000 Phred+33

Example of wrong update diff with only ID given (see inconsistency in Value[Library kit] and Comment[Library kit catalogue ID] ):

Sample Name    Protocol REF    Parameter Value[Concentration measurement]      Performer       Date    Extract Name    Characteristics[Concentration]  Unit    Term Source REF Term Accession Number   Protocol REF    Parameter Value[Provider name]  Parameter Value[Provider contact]      Parameter Value[Provider project ID]    Parameter Value[Provider sample ID]     Parameter Value[Provider QC status]     Parameter Value[Requestor contact]      Parameter Value[Requestor project]      Parameter Value[Requestor sample ID]    Parameter Value[Concentration measurement]     Parameter Value[Library source] Parameter Value[Library strategy]       Parameter Value[Library selection]      Parameter Value[Library layout] Parameter Value[Library kit]    Comment[Library kit catalogue ID]       Parameter Value[Target insert size]    Parameter Value[Wet-lab insert size]    Parameter Value[Barcode kit]    Parameter Value[Barcode kit catalogue ID]       Parameter Value[Barcode name]   Parameter Value[Barcode sequence]       Performer       Date    Library Name    Characteristics[Folder name]   Characteristics[Concentration]  Unit    Term Source REF Term Accession Number   Protocol REF    Parameter Value[Platform]       Parameter Value[Instrument model]       Parameter Value[Base quality encoding]  Parameter Value[Center name]    Parameter Value[Center contact]        Performer       Date    Raw Data File
-LB20_2553-N1   Nucleic acid extraction WES                             LB20_2553-N1-DNA1                                       Library construction WES                                                                                GENOMIC WXS     Hybrid Selection      PAIRED   Agilent SureSelect Human All Exon V6r2  S07604514                                                                       LB20_2553-N1-DNA1-WES1  LB20-2553                                       Nucleic acid sequencing WES     ILLUMINA        Illumina NovaSeq 6000 Phred+33                                                                                                                                                                                                                                                                        
-LB21_0274-N1   Nucleic acid extraction WES                             LB21_0274-N1-DNA1                                       Library construction WES                                                                                GENOMIC WXS     Hybrid Selection      PAIRED   Agilent SureSelect Human All Exon V6r2  S07604514                                                                       LB21_0274-N1-DNA1-WES1  LB21-0274                                       Nucleic acid sequencing WES     ILLUMINA        Illumina NovaSeq 6000 Phred+33                                                                                                                                                                                                                                                                        
+LB20_2553-N1   Nucleic acid extraction WES                             LB20_2553-N1-DNA1                                       Library construction WES                                                                                GENOMIC WXS     Hybrid Selection      PAIRED   Agilent SureSelect Human All Exon V6r2  S33266340                                                                       LB20_2553-N1-DNA1-WES1  LB20-2553                                       Nucleic acid sequencing WES     ILLUMINA        Illumina NovaSeq 6000 Phred+33                                                                                                                                                                                                                                                                        
+LB21_0274-N1   Nucleic acid extraction WES                             LB21_0274-N1-DNA1                                       Library construction WES                                                                                GENOMIC WXS     Hybrid Selection      PAIRED   Agilent SureSelect Human All Exon V6r2  S33266340                                                                       LB21_0274-N1-DNA1-WES1  LB21-0274                                       Nucleic acid sequencing WES     ILLUMINA        Illumina NovaSeq 6000 Phred+33
@sellth sellth added the bug Something isn't working label Dec 7, 2023
@Nicolai-vKuegelgen
Copy link
Contributor

This issue is still present and should be solved

@Nicolai-vKuegelgen
Copy link
Contributor

okay, I think I have a fix for this.
And just have it noted: the add-ped function is coded in a pretty complicated way so any fixes or functionality changes here will be slow coming.

@Nicolai-vKuegelgen
Copy link
Contributor

@your-highness

Fix incoming, I hope the issue is solved with the newest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants