Monday, 13 September 2021

Programming. What I have learnt in the last months


**Programming in Genomics Facility:**


Programming is essential in a genomics facility for analyzing vast amounts of data, filtering variants related to specific genetic conditions, and more. Building programs requires proficiency in programming languages and adherence to best practices.


**Recent Focus: Identifying Matching VCF Files:**

In the last few weeks, I have been developing a program to detect when two VCF files belong to the same patient. Key learning includes:


**A) General Programming Principles:**

   - Write for people, not just computers.

   - Maintain consistency, let the computer repeat tasks, use version control, etc.

   - Re-use and modularize code; plan for mistakes and optimize after correctness.

   - Document purpose and design; collaborate using code reviews, pair programming, and issue tracking tools.


**B) Adherence to International Standards:**

   - Complying with rules like PEP 8 and the Python style guide.

   - Tools like pylint assist in identifying errors or deviations from these standards.


**Importance for Clinical Bioinformaticians:**

   - Ensuring proper documentation and commenting is crucial.

   - Commenting makes maintenance easier, aids in bug detection, and provides essential guidance for other users.

   - Well-documented code is as vital as correctly working code, enhancing the usability and understanding of programs.


In conclusion, programming in the context of genomics demands a blend of technical expertise, adherence to international standards, and clear communication through proper documentation. These principles foster more effective collaboration and facilitate the continued development and maintenance of vital tools within the field.

Sunday, 23 May 2021

The c.288+74_359delinsTAATGA case.

This discussion revolves around a real case that was presented to me by my supervisor as part of my ongoing training. The focus of the case was on a deletion detected in a sample, specifically in exons 3 and 4 of the NF1 gene, as identified by Multiplex Ligation-dependent Probe Amplification (MLPA).


**My First Task:** To determine the exact nature of the deletion. The challenge was to confirm whether the deletion involved the entire exons 3 and 4 or if it was a smaller, more localized deletion that just happened to encompass the region where the MLPA probe was located.


The importance of making this distinction lies in understanding the precise nature of the genetic alteration, which can have profound implications for diagnosis and potential treatment. This real-world scenario provided an invaluable learning experience, highlighting the intricacies of genetic analysis and the attention to detail required in the field.




The images provided in this case study illustrate what appears to be a potential partial exon deletion, rather than a complete deletion of the entire exon.


**Investigation Details:** With guidance from my supervisor, further examination revealed that the deletion extended into the intron region between exons 3 and 4.


- **First Screenshot:** This image displays a deletion close to the sequence region immediately following exon 3.

- **Second Screenshot:** This image highlights the region of exon 4.


These findings offer a more nuanced understanding of the deletion, emphasizing the complexity of genetic variations. Such insights may have implications for the diagnosis or management of conditions associated with these gene regions. The collaborative investigation process also served as an educational opportunity, allowing me to gain hands-on experience in genetic analysis.








After this finding, I wanted to see exactly the kind of variant so I looked at base-pair resolution. Apart from the huge region deleted, a short region of 6 nucleotides was also found as shown in the next picture.





Some code I used during this search in case I need to go to the raw data quickly 

module load igv/2.3.88

igv 210205_M01875_0660_000000000-JFPJK_rpt_369891814.bam



Friday, 23 April 2021

Personal notes about NGS.


In this post, I aim to provide a concise reference guide related to various high-throughput sequencing technologies. I felt compelled to create this guide, as I've often had to refer back to these details and occasionally found it challenging to locate the specific data.

**Sanger Sequencing:**

- **Throughput:** Capable of running up to 384 samples in a single session.
- **Base Reads:** Offers read lengths of approximately 700 base pairs.
- **Daily Output:** Can produce up to 1 million bases per day.
- **Coverage:** Typically provides a 7x coverage of the sequence.

I hope that by compiling this information, I'm helping others who may encounter similar difficulties. Whether you're a seasoned expert or new to the field of high-throughput sequencing, having this information at your fingertips can be a valuable time-saver.

Illumina sequencer: 









Comparison of high-throughput sequencing methods
MethodRead lengthAccuracy (single read not consensus)Reads per runTime per runCost per 1 billion bases (in US$)AdvantagesDisadvantages
Single-molecule real-time sequencing (Pacific Biosciences)
Long-Read
30,000 bp (N50);

maximum read length >100,000 bases[79][80][81]

87% raw-read accuracy[82]4,000,000 per Sequel 2 SMRT cell, 100–200 gigabases[79][83][84]30 minutes to 20 hours[79][85]$7.2-$43.3Fast. Detects 4mC, 5mC, 6mA.[86]Moderate throughput. Equipment can be very expensive.
Ion semiconductor (Ion Torrent sequencing)up to 600 bp[87]99.6%[88]up to 80 million2 hours$66.8-$950Less expensive equipment. Fast.Homopolymer errors.
Pyrosequencing (454)700 bp99.9%1 million24 hours$10,000Long read size. Fast.Runs are expensive. Homopolymer errors.
Sequencing by synthesis (Illumina)MiniSeq, NextSeq: 75–300 bp;

MiSeq: 50–600 bp;

HiSeq 2500: 50–500 bp;

HiSeq 3/4000: 50–300 bp;

HiSeq X: 300 bp

99.9% (Phred30)MiniSeq/MiSeq: 1–25 Million;

NextSeq: 130-00 Million;

HiSeq 2500: 300 million – 2 billion;

HiSeq 3/4000 2.5 billion;

HiSeq X: 3 billion

1 to 11 days, depending upon sequencer and specified read length[89]$5 to $150Potential for high sequence yield, depending upon sequencer model and desired application.Equipment can be very expensive. Requires high concentrations of DNA.
Combinatorial probe anchor synthesis (cPAS- BGI/MGI)BGISEQ-50: 35-50bp;

MGISEQ 200: 50-200bp;

BGISEQ-500, MGISEQ-2000: 50-300bp[90]

99.9% (Phred30)BGISEQ-50: 160M;

MGISEQ 200: 300M;

BGISEQ-500: 1300M per flow cell;

MGISEQ-2000: 375M FCS flow cell, 1500M FCL flow cell per flow cell.

1 to 9 days depending on instrument, read length and number of flow cells run at a time.$5– $120
Sequencing by ligation (SOLiD sequencing)50+35 or 50+50 bp99.9%1.2 to 1.4 billion1 to 2 weeks$60–130Low cost per base.Slower than other methods. Has issues sequencing palindromic sequences.[91]
Nanopore Sequencing
Long-Read
Dependent on library preparation, not the device, so user chooses read length (up to 2,272,580 bp reported[92]).~92–97% single readdependent on read length selected by userdata streamed in real time. Choose 1 min to 48 hrs$7–100Longest individual reads. Accessible user community. Portable (Palm sized).Lower throughput than other machines, Single read accuracy in 90s.
GenapSys SequencingAround 150 bp single-end99.9% (Phred30)1 to 16 millionAround 24 hours$667Low-cost of instrument ($10,000)
Chain termination (Sanger sequencing)400 to 900 bp99.9%N/A20 minutes to 3 hours$2,400,000Useful for many applications.More expensive and impractical for larger sequencing projects. This method also requires the time-consuming step of plasmid cloning or PCR.

Sunday, 11 April 2021

What is more important - the individual privacy right or the wellbeing for society?

During my attendance at the National Information Governance training module, I found myself contemplating how data protection regulations in the UK specifically apply to genetic data. My curiosity was piqued by the potential challenges that UK rules governing the use of such data might pose to legitimate healthcare and research applications. This concern is grounded in the understanding that the sharing of genomic data can profoundly enhance medical research and healthcare delivery. The benefits of genomic data sharing are immense, especially when it comes to clinical geneticists comparing uncertain genetic results with existing databases. This comparative approach can often lead to more precise diagnoses, improved disease management, and consequently, enhanced healthcare services. To continually reap these benefits, it's essential to augment the size and diversity of genomics databases. I must admit that I'm not an expert in this area, but my preliminary reading leads me to conclude that there exists a legal gray zone. Striking the right balance between individual rights and the societal imperative of sharing genetic information seems to be a nuanced challenge. It appears that there's a lack of definitive guidance, with different laboratories interpreting the law in subtly distinct ways. The multifaceted nature of this issue allows for various approaches. Central to the debate is the question of whether we can truly identify a person through genetic data. Personal identifiable data is a double-edged sword: it possesses immense intrinsic value but can also be employed maliciously to discriminate or stigmatize individuals. A critical task is defining what constitutes identifiable versus de-identified data, as the current law makes distinctions based on these categories. For instance, if genetic data is deemed neither confidential nor identifiable, the law may permit more liberal sharing. Regrettably, these challenges are not solely technical in nature. The understanding of this complex issue extends into the realms of politics and philosophy. We must grapple with a profound question: What takes precedence, individual privacy rights or societal wellbeing? The stance taken on this question will have significant ramifications for the future of clinical genetics and my professional development. Furthermore, it's vital to recognize the political dimension to this discourse. Advocates for enhanced data sharing may perceive existing protections, such as anonymization coupled with managed access, as more robust than those primarily concerned with safeguarding individual privacy rights. The stakes in this debate are elevated, as the implications for healthcare and society are far-reaching, contingent upon the vision that is ultimately embraced.

Tuesday, 5 January 2021

Colorectal Somatic MLH1 case

 

Colorectal Somatic MLH1 case

This document presents a discussion centered around a real case wherein my supervisor was tasked with verifying whether a deletion variant was not identified in the NGS (Next-Generation Sequencing) data of a test conducted three years ago. The purpose of this discourse is educational. In the following text, I will outline the process utilized to analyze the NGS data, the conclusions derived from this examination, and a draft of what my response would be (via email) if I were in charge of this verification. The discussion will conclude with an exploration of the current developments regarding the patient in question.


Background

The patient in question was diagnosed with well-differentiated adenocarcinoma of the bowel at the age of 38. Family history includes his father's diagnosis of colon cancer and his sister's diagnosis of colorectal polyposis. In December 2017, the patient underwent germline testing for the MLH1, MSH2, MSH6, and PMS2 genes, but no pathogenic variant was identified. Subsequently, in February 2018, an immunohistochemistry (IHC) analysis revealed a loss of MLH1 and PMS2, and normal MLH1 promoter methylation status. Additionally, a tumor pathology sample was screened for variants in a 13-gene panel associated with inherited predisposition to colorectal cancer. The variant c.2169_2175del p.(Leu724HisfsTer57) was found in 30% of sequence reads, along with a loss of heterozygosity (LOH) across multiple SNV markers in the MLH1 region. This particular variant, MLH1 c.2169_2175del p.(Leu724HisfsTer57), is a stop-loss variant that extends the protein by 23 amino acids. It has been assessed as likely pathogenic (ACGS Class 4) according to published guidelines. My supervisor has been tasked with verifying that this variant was not detected in the original germline test. I have seized this opportunity to draft this document, detailing the procedure, interpretation, and conclusions derived from this case.

Procedure to analyse the absence of the variant c.2169_2175de


The first step has been to access the folder where the NGS data is stored, this step has been carried out by using IRIDIS4.

The steps needed to open ivg with this terminal are:

[mdb1c20@cyan01 ~]$ cd /scratch

[mdb1c20@cyan01 scratch]$ cd WRGL/

[mdb1c20@cyan01 WRGL]$ cd 000000_M01875_0303_000000000-B394W_RPT/

# For patient confidentiality, the last folder show is not real

[mdb1c20@cyan01  000000_M01875_0303_000000000-B394W_RPT]$ cd 1142149020

[mdb1c20@cyan01 1142149020]$ module load igv/2.3.88

[mdb1c20@cyan01 1142149020]$ igv  000000_M01875_0303_000000000-B394W_RPT_1142149020.bam 3:37092042
# After the name of the bam file, the coordinates of the variant can be specified.

 

A screenshot in which it can be seen the output provided by igv is shown below.



The alignment representation for the coordinates at chromosome 3, location 37,092,042 is depicted in the last figure. This specific region of the genome displays approximately 415 reads, indicating that there is no evidence to support the occurrence of a deletion within this chromosome segment. In DNA sequencing, a "read" refers to an inferred sequence of base pairs that corresponds to part of a single DNA fragment. In this particular instance, it corresponds to the aforementioned location. As there is a certain degree of uncertainty between the true DNA molecule and the final set of reads, multiple reads are necessary to minimize this uncertainty. A count of 400 reads surpasses the required number to deem the quality of this region acceptable, thereby eliminating the quality of the analysis as a contributing factor to the existence of this variant. This confirms that the variant is not present in the data. A potential response to the email received by my supervisor could be as follows: --- Dear Clinical Scientist, I have conducted an analysis on the NGS data (1142149020/W1702270) specifically targeting the region of the mentioned variant (c.2169_2175del, Chr3(GRCh38):g.37050551_37050557del, NM_000249.2(MLH1):c.2169_2175del). I can confirm that the NGS test performed in 2017 reveals NO evidence to support the presence of a deletion at this position. Below, you will find the nucleotides located between the positions 37092037 to 37092052, along with their respective frequency. Please let me know if you require further details or clarification.




Positions

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

Nucleotides

A

A

A

G

C

C

T

T

G

C

G

C

T

C

A

C

Counting

C

1

0

1

0

414

413

0

0

1

433

0

440

0

455

1

459

T

0

0

0

2

0

0

416

418

2

1

1

0

440

0

0

0

G

0

0

0

414

0

0

0

0

418

0

432

0

0

0

0

0

A

405

404

403

0

1

0

1

0

0

0

2

0

0

0

455

0

Total count

406

404

404

416

415

413

417

418

421

434

435

440

440

455

456

459



















I have also checked that this sequence corresponds with the reference genome by using Mutalizer.

CTGTGGAACACATTGTCTATAAAGC CTTGCGC TCACACATTCTGCCTCCTAAACATT

CTGTGGAACACATTGTCTATAAAGC ------- TCACACATTCTGCCTCCTAAACATT


As you can see, in the table the region when the variant is located (marked in blue color) and their closest nucleotides show a regular pattern of readings where the frequency of one amino acid always predominates over the other three. We can see also that this region was coverage sufficiently in the variant location. The quality of this region confirms that according to this data there is no reason to think that there is a deletion in the mentioned coordinates. A drop in the number of amino acids counted is NOT observed in the variant location so according to this data, we can confirm that there is not a deletion between the position 37092042 to 37092048.


With this analysis and with the data provided in the report you provide me in your email I interpret that this variant is not in the germ line and this mutation has occurred in the patient's tumor cells. 


Do not hesitate if you require any further information.


Regards


Manuel

Patient-centered approach

This has been my inaugural real-case scenario, allowing me to engage in detailed discussions with my supervisor about aspects related to this patient's pathology. The email inquiry received by the genetic counseling department stems from the necessity to ascertain whether the identified variant (c.2169_2175del) is of germ-line origin or if it's a mutation specific to the colon cancer cells. The patient's medical history, marked by two instances of colon cancer (the patient and his father) and a third family member with polyps, suggests a possible inheritance pattern. However, the genetic tests conducted thus far have not confirmed any somatic origin variants. This verification carries significant implications not only for the patient but also for their family members. Firstly, confirming a somatic origin would reduce the likelihood of a Lynch syndrome diagnosis, possibly leading to alterations in future treatment strategies. As a bioinformatician, my familiarity with clinical criteria is limited, yet it seems likely that if a somatic origin is confirmed, additional measures such as screening the offspring or other close relatives (e.g., the patient's sister) would be undertaken. Considering the lack of evidence to corroborate the somatic origin of variants explaining this pathology, my supervisor and I have delved into the underlying reasons for the high incidence of colon cancer within this family. Our discussion has been constrained by the limited information about the family, as the necessary details were not provided in the reports we had access to. Several unanswered questions linger, such as whether these three medical cases are merely a result of unfortunate coincidence or if they could be attributed to inheritable factors that remain undetected due to current limitations. Personally, I'm uncertain whether this is a common occurrence or an exceedingly rare case where family members develop a pathology that hints at an inheritance pattern without any supporting evidence. Presuming that this is not an isolated incident, and possibly stemming from my novelty in the field, I find myself grappling with additional questions. These include the sensitivity of current techniques (the true positive rate) in the diagnosis of causative variants and the frequency with which existing variants may go undetected in patients subjected to current testing methodologies. These questions underscore the complexity of the issue at hand and the challenges faced in the field of genetic diagnostics.


Feedback of supervisor:

I would advise against including a comprehensive table like the one you're contemplating. While it might seem like a thorough approach, it's not particularly clear and might be cumbersome for the reader. Many people seek professional opinions precisely to avoid sifting through complex data themselves. The key point to remember is that they're requesting not just raw information but your professional insight. When you confirm that the coverage and/or quality is good, they will likely trust your judgment, as interpreting the data is within your expertise. Should the email you send become part of the patient's record in Starlims, providing a brief summary of the average coverage along with a comment on data quality should suffice.

In the same vein, the direct comparison between the observed sequence and the variant sequence may be an overextension. While it could be helpful, it's generally more relevant if you're referring to a variant that's actually present in the data. For better readability, I suggest using a monospace font like courier or consolas for alignments. This will ensure that the two sequences align perfectly, even if one has gaps. For example:

Using monospace:

```
CTGTGGAACACATTGTCTATAAAGC CTTGCGC TCACACATTCTGCCTCCTAAACATT
CTGTGGAACACATTGTCTATAAAGC ------- TCACACATTCTGCCTCCTAAACATT
```

vs.

```
CTGTGGAACACATTGTCTATAAAGC CTTGCGC TCACACATTCTGCCTCCTAAACATT
CTGTGGAACACATTGTCTATAAAGC ------- TCACACATTCTGCCTCCTAAACATT
```

This presentation is undoubtedly clearer!

As you gain more experience, I believe you'll grow more confident in your interpretations, feeling less compelled to include exhaustive copies of items, though screenshots can sometimes be highly beneficial. For now, if including extra information brings you peace of mind, it's a good practice. It's preferable to have too much information rather than too little.

Lastly, your observation regarding the read distribution was spot on and precisely what you'd expect to see. I suggest examining how some capture kits (e.g., Nextera, SureSelect) operate, and we can discuss why you might observe this pattern during our meeting on Thursday.