Добавил:
kiopkiopkiop18@yandex.ru t.me/Prokururor I Вовсе не секретарь, но почту проверяю Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Ординатура / Хирургия / Библиотека им академика М.И. Перельмана / Книга_5529_Библиотеки_им_академика_М_И_Перельмана

.pdf
Скачиваний:
0
Добавлен:
31.08.2026
Размер:
26 Мб
Скачать
114 Bioinformatics of Autoimmune Diseases
TABLE 4.2 Lists of Entrez Databases and Their Applications
Database Use Case for Autoimmune Diseases
GENE Retrieve gene information related to autoimmune diseases GenBank Obtain nucleotide sequences for immune-related genes Protein Fetch protein sequences for autoimmune-associated genes RefSeq Access reference sequences for consistent genomic/proteomic analysis dbSNP Identify SNPs linked to autoimmune disease susceptibility dbVAR Explore structural variations related to autoimmunity OMIM Retrieve genetic disease descriptions and associations ClinVar Get variant interpretations in autoimmune conditions GEO Download gene expression datasets for autoimmune studies SRA Fetch raw sequencing reads related to autoimmune research
from Bio import Entrez def fetch_gene_ids(disease, output_file):
Entrez.email = "your_email@example.com" query = f"{disease}[Title] AND human[ORGN] AND alive[prop]" handle = Entrez.esearch(db="gene", term=query, retmax=100) record = Entrez.read(handle) handle.close() gene_ids = record["IdList"] with open(output_file, "w") as f:
for gene_id in gene_ids:
f.write(f"{gene_id}\n") fetch_gene_ids("multiple sclerosis", "MS_gene_ids.txt") fetch_gene_ids("Systemic Lupus Erythematosus", "SLE_gene_ids.txt")
The program “ncbi _ gene _ ids.py” retrieves unique gene IDs related to specied autoim- mune diseases from the NCBI Gene database using the Entrez API. It performs a search query with esearch(), using disease names (e.g., “multiple sclerosis”) as keywords. The query returns a list of gene IDs associated with the disease based on NCBI’s indexed data. These gene IDs are then stored in a text le for future use.
Obtaining gene IDs related to an autoimmune disease allows us to use these IDs to fetch the necessary information. The Entrez API retrieves gene information in XML format. To process this data efciently, we have developed a Python JSON parser called “gene _ info _ parser.py”, which takes a le containing gene IDs and an output directory name as inputs.
The script fetches gene data from NCBI’s Gene database in JSON format using the esummary function. The raw JSON data includes structured information about each gene, such as its name, description, chromosome location, organism, function, and other attributes. Since JSON is a hier­archical format with nested keys and values, the script processes the data recursively to extract all available information and store it in a human-readable text format.
Each gene’s information is saved in a separate text le, named after the corresponding gene ID (e.g., 5133.txt for the PDCD1 gene). These text les are stored in the specied output directory or in “gene _ outputs” if no directory is specied. The content inside each le follows a structured format, where each eld is written on a new line with proper indentation to enhance readability.
The JSON format contains key-value pairs, where some values are simple strings (e.g., "name": "P D C D1"), while others are more complex structures like nested dictionaries or lists. The script recursively parses the JSON data, ensuring that each eld is extracted and formatted correctly.
For example, the JSON representation of the PDCD1 gene data might look like this:
{
"uid": "5133", "name": "PDCD1", "description": "Programmed cell death 1", "chromosome": "2", "organism": {
"scientificname": "Homo sapiens",
"commonname": "human" }, "nomenclatureSymbol": "PDCD1", "otherDesignations": ["programmed cell death protein 1", "hPD-1"]
}
This structured data is converted into a readable text format using indentation and line breaks:
uid: 5133 name: PDCD1 description: Programmed cell death 1 chromosome: 2 organism scientificname: Homo sapiens organism commonname: human nomenclatureSymbol: PDCD1 otherDesignations: programmed cell death protein 1; hPD-1 maplocation: 2q37.3 status: current summary: This gene encodes a cell surface membrane protein...
115 Bioinformatics Databases
By storing each gene’s information in a separate le in the output directory, the data remains
well-organized and easy to retrieve.
Once the information of each gene has been saved in a le in the output directory, then you can use “extract _ gene _ data.py” program, which processes text les in the directory to extract relevant gene information and store it in a structured comma-separated values (CSV) format. It reads each le, extracts predened key-value pairs, and handles specic transformations to ensure consistency in the output. The script denes a set of keys that are important for extraction, including details like gene name, chromosome location, and genomic information. Additionally, it renames certain elds, mapping “organism scientificname” to “organism” and “organism taxid” to “taxid” to ensure clarity in the nal dataset. For genomic information, if it exists in a structured dictionary format within the text le, the script extracts specic elds such as chrac- cver, chrstart, chrstop, and exoncount. If this data is missing or marked as “NA”, the script ensures these elds remain as “NA” in the nal dataset. It processes each le in the directory, compiles the extracted data, and then writes it to a CSV le where each row corresponds to a gene entry and follows a standardized structure. The script is designed to handle errors gracefully, ensur­ing that even incomplete or malformed les do not disrupt the data extraction process. Once all les are processed, the extracted data is saved as a CSV le, making it easier to analyze and manipulate in spreadsheet software or other data processing tools.
As an example, we can use “chraccver”, “chrstart”, and “chrstop” to fetch the FASTA sequences of genes from the NCBI Nucleotide database for genes that have available genomic con­text, including the accession number and gene coordinates.
The “fetch _ gene _ fasta.py” script processes a CSV le containing genomic data, extracts relevant elds, and retrieves nucleotide sequences from the NCBI database using the Biopython library. It begins by setting up an environment to read the CSV le and ensures that nec­essary directories exist for storing output FASTA les. The script veries that each row in the CSV
116 Bioinformatics of Autoimmune Diseases
le has valid values for the accession number, start, and stop coordinates, ensuring that missing or improperly formatted data does not cause errors. If the required elds are present and properly for­matted, it converts the start and stop positions into integers to be used in sequence retrieval.
Using the Biopython Entrez module, the script queries the NCBI Nucleotide database with the provided accession number and coordinates. If a sequence is successfully fetched, the script constructs a FASTA deine containing various metadata elds from the CSV le, formatted as key-value pairs separated by vertical bars. The metadata includes IDs such as UID, gene name, Mendelian Inheritance in Man (MIM) number, exon count, organism name, and taxonomy ID, providing comprehensive contextual information about each sequence.
Each retrieved sequence is saved in a separate FASTA le named according to the unique ID from the CSV le. The script ensures that all FASTA les are stored in a designated output direc­tory, maintaining an organized structure. If any errors occur during the sequence retrieval process, such as an invalid accession number or unavailable sequence data, they are logged without inter­rupting the overall execution. Upon completion, the script provides a summary of the processed entries, conrming that the genomic sequences have been successfully retrieved and stored.
FASTA sequences retrieved from the NCBI RefSeq GenBank database for genes associated with autoimmune diseases serve as a crucial resource for bioinformatics analyses, comparative genomics, and medical research. These sequences provide the fundamental genetic blueprint of genes implicated in conditions. By analyzing these sequences, researchers can identify variations such as SNPs or insertions and deletions (indels) that may contribute to disease susceptibility. Understanding these genetic variations enables scientists to investigate their potential impact on gene function, expression levels, and protein structure, shedding light on the molecular mechanisms underlying autoimmune disorders.
The availability of these sequences in FASTA format facilitates computational analysis using various bioinformatics tools. Researchers can perform multiple sequence alignments to compare gene variants across populations or species, identifying conserved regions that may play critical roles in immune system regulation. These sequences also allow for the identication of regula­tory elements such as promoters and enhancers, which inuence gene expression in immune cells. Furthermore, by mapping the sequences to reference genomes, scientists can examine gene splicing patterns and alternative transcripts that might be associated with disease progression or differential immune responses.
In the eld of drug discovery and personalized medicine, the analysis of autoimmune disease–associated gene sequences can help identify potential therapeutic targets. Computational approaches, including molecular docking and structural modeling, can be applied to assess how genetic variations affect protein interactions and immune signaling pathways. By leveraging these insights, researchers can develop targeted treatments that modulate immune responses more pre­cisely, reducing inammation while minimizing adverse effects. Additionally, these sequences play a role in designing diagnostic tools such as PCR-based assays or CRISPR-based detection systems, enabling early and more accurate identication of genetic predispositions to autoimmune diseases.
Beyond clinical and pharmaceutical applications, the study of these sequences contributes to evolutionary and population genetics. By comparing autoimmune-related gene sequences across different ethnic groups and ancestral lineages, researchers can explore the genetic factors that have shaped immune system diversity. This helps in understanding why certain populations may be more susceptible to specic autoimmune conditions than others. Such knowledge can inform public health strategies and precision medicine initiatives, tailoring treatments and preventive measures based on genetic risk factors.
Overall, FASTA sequences of genes linked to autoimmune diseases offer a wealth of information for biomedical research, from understanding disease mechanisms to developing novel therapies. The ability to retrieve and analyze these sequences through publicly available databases like NCBI RefSeq GenBank ensures that researchers worldwide have access to high-quality genomic data,
117 Bioinformatics Databases
accelerating discoveries that could lead to better treatments and improved outcomes for individuals affected by autoimmune disorders.
4.2.1.2.2 Fetching Autoimmune-Related Nucleotide Sequences
from Bio import Entrez, SeqIO Entrez.email = "your_email@example.com" # Search and fetch transcript sequences def fetch_all_hla_a_fasta(geneName, outputFile):
search_term = f"{geneName}[Gene] AND Homo sapiens[Organism]" search_term += " AND biomol_mrna[PROP] AND refseq[FILT]" with Entrez.esearch(db="nucleotide", term=search_term,
retmax=1000) as handle:
record = Entrez.read(handle)
if not record["IdList"]:
print("No sequences found.")
return seq_ids = record["IdList"] # Get all sequence IDs with Entrez.efetch(db="nucleotide", id=",".join(seq_ids),
rettype="fasta", retmode="text") as handle:
fasta_data = handle.read() with open(outputFile, "w") as fasta_file:
fasta_file.write(fasta_data) print(f"FASTA sequences saved in {outputFile}")
# Run function geneName="HLA-A" outputFile = "HLA_A_all_transcripts.fasta" fetch_all_hla_a_fasta(geneName, outputFile)
The script is designed to retrieve the complete transcript sequences of the HLA-A gene from the NCBI Nucleotide database, specically ltering for RefSeq transcripts to ensure high-quality, curated sequences. It rst searches the database using the Entrez API with a query that restricts results to Homo sapiens mRNA sequences associated with the HLA-A gene and RefSeq IDs. The script then retrieves all matching sequence IDs and fetches their corresponding FASTA sequences, saving them in a multi-FASTA le named “HLA_A_RefSeq_transcripts.fasta”. This output le contains multiple transcript sequences of HLA-A in FASTA format, which can be used for further bioinformatics analysis, such as multiple sequence alignments, evolutionary studies, or functional annotation.
HLA-A is a crucial component of the human major histocompatibility complex (MHC) class I system, playing a fundamental role in antigen presentation and immune system regulation. It encodes a cell surface glycoprotein that binds and presents intracellularly derived peptides to cyto­toxic T lymphocytes, enabling the immune system to recognize and eliminate infected or abnormal cells. Variations in HLA-A have been linked to several autoimmune diseases, including type 1 diabetes, rheumatoid arthritis, and ankylosing spondylitis, as different alleles inuence immune tolerance and self-recognition. Certain HLA-A alleles can predispose individuals to autoimmunity by promoting aberrant immune responses against self-antigens, contributing to chronic inamma­tion and tissue damage. Understanding the sequence diversity of HLA-A transcripts is essential for studying its role in disease susceptibility, immune response variability, and potential applications in personalized medicine and immunotherapy.
4.2.1.2.3 Fetching Gene-Related Transcripts and Proteins
import os from Bio import Entrez, SeqIO Entrez.email = "your_email@example.com"
118 Bioinformatics of Autoimmune Diseases
def get_refseq_ids(gene_id):
transcript_ids, protein_ids = [], [] # Query NCBI Gene Database handle = Entrez.elink(dbfrom="gene",
db="nucleotide",
id=gene_id,
linkname="gene_nuccore_refseqrna") records = Entrez.read(handle) handle.close() # Extract transcript RefSeq IDs if records and records[0]['LinkSetDb']:
linkset_db_tr = records[0]['LinkSetDb'][0]['Link'] transcript_ids = [
link["Id"] for link in linkset_db_tr
]
# Query for protein IDs
handle = Entrez.elink(dbfrom="gene", db="protein", id=gene_id,
linkname="gene_protein_refseq") records = Entrez.read(handle) handle.close() # Extract protein RefSeq IDs if records and records[0]['LinkSetDb']:
linkset_db_pr = records[0]['LinkSetDb'][0]['Link'] protein_ids = [
link["Id"] for link in linkset_db_pr
]
return transcript_ids, protein_ids
def fetch_fasta(seq_ids, db, output_file):
if not seq_ids:
print(f"No sequences found in {db} database.") return
handle = Entrez.efetch(db=db,
id=",".join(seq_ids), rettype="fasta",
retmode="text") fasta_data = handle.read() handle.close() with open(output_file, "w") as f:
f.write(fasta_data)
print(f"Saved {db} sequences to {output_file}")
def main(gene_id):
transcript_ids, protein_ids = get_refseq_ids(gene_id) # Save transcripts fetch_fasta(transcript_ids,"nucleotide",
f"gene_{gene_id}_transcripts.fasta") # Save proteins fetch_fasta(protein_ids, "protein", f"gene_{gene_id}_proteins.fasta")
if __name__ == "__main__":
gene_id = "3105" main(gene_id)
This Python program “fetch _ gene _ transcripts.py” is designed to retrieve and save FASTA sequences for RefSeq transcripts and proteins associated with a given gene ID. By utiliz­ing the NCBI Entrez API, the script automates the process of extracting relevant sequence data,
119 Bioinformatics Databases
eliminating the need for manual searches. It rst queries the NCBI Gene database to obtain RefSeq transcript and protein IDs linked to the specied gene, then fetches the corresponding sequences from the nucleotide and protein databases. The results are saved into separate FASTA les, allow­ing researchers to access and analyze the gene’s functional elements efciently. This streamlined approach is particularly useful in large-scale genomic studies, bioinformatics pipelines, and cases where rapid access to sequence data is essential for research or clinical applications.
The ability to retrieve gene-related transcripts and proteins is particularly valuable in the study of autoimmune diseases, where gene expression and protein function play critical roles in immune system dysregulation. Autoimmune diseases often involve genetic variations that affect immune­related genes. By analyzing the transcripts of these genes, researchers can identify alternative splic­ing events or expression changes that may contribute to disease susceptibility. The corresponding protein sequences are equally important, as autoimmune disorders often arise due to the misfolding, overexpression, or aberrant function of immune system proteins. For instance, cytokines and their receptors, MHC proteins, and signaling molecules are frequently implicated in immune responses that mistakenly target the body’s own tissues. Investigating these sequences allows scientists to explore potential biomarkers, develop targeted therapies, and better understand the molecular mechanisms underlying autoimmune pathogenesis.
4.2.1.2.4 Searching NCBI GEO for Autoimmune Disease Gene Expression Studies
The GEO is a public repository maintained by the NCBI that stores high-throughput gene expres­sion and small RNA-Seq data. Researchers can use GEO to access a vast collection of datasets submitted from various studies, including those focused on autoimmune diseases. By searching GEO using relevant keywords, such as specic autoimmune conditions, gene names, or experimen­tal techniques, users can nd expression proles across different tissues, conditions, and patient groups. GEO provides several tools, such as GEO DataSets and GEO Proles, to explore processed data and visualize expression patterns. Additionally, raw sequencing data can be downloaded for further bioinformatics analysis, allowing researchers to investigate differentially expressed genes and small RNA signatures linked to autoimmune disease pathogenesis.
We can use the Python script “ncbi _ geo _ search.py” to automate the process of search- ing for RNA-Seq datasets related to autoimmune diseases in the NCBI GEO database. By using the Bio.E ntrez module from Biopython, the script sends queries to NCBI, retrieves relevant dataset IDs, extracts detailed information about each dataset, and further identies associated SRA IDs for RNA-Seq data analysis. This approach allows researchers to quickly nd relevant datasets and access raw sequencing data for further processing. In the following, we will discuss the functions in “ncbi _ geo _ search.py”.
from Bio import Entrez import time # Set email for NCBI access Entrez.email = "your_email@example.com" # Function to search GEO def search_geo(query, db="gds", retmax=1000):
handle = Entrez.esearch(db=db, term=query, retmax=retmax) record = Entrez.read(handle) handle.close() return record["IdList"]
The search _ geo() function begins by setting the user’s email, which is required by NCBI to track access and prevent misuse. It then performs a search in the GEO database using a query. The query must be passed as an argument when calling the function. The query can combine “RNA- Seq” and “autoimmune disease”, and “organism” or any other keywords of interest ensuring that the retrieved datasets are relevant to transcriptomic studies in this eld. The search result will return
120 Bioinformatics of Autoimmune Diseases
a list of GEO dataset IDs, which can be then stored in a text le (e.g., g eo _ i ds.tx t) for future reference. This step provides a structured way to keep track of datasets without manually searching through NCBI’s web interface.
# Function to fetch GEO dataset details def fetch_geo_details(geo_id):
handle = Entrez.esummary(db="gds", id=geo_id) record = Entrez.read(handle) handle.close() return record[0] if record else None
Once the GEO dataset IDs are obtained, we can use a Python loop with the fetch _ geo _ details() function, which takes a GEO ID as an argument. The loop iterates through the list
of GEO IDs, retrieving dataset summaries for each record, including the title, description, dataset type, and accession number. This information is crucial for assessing the relevance of each dataset before downloading raw sequencing data.
# Function to find SRA ID from GEO accession def find_sra_ids(geo_accession):
query = f"{geo_accession} AND transcriptomic" handle = Entrez.esearch(db="sra", term=query, retmax=100) record = Entrez.read(handle) handle.close() return record["IdList"]
The details, which include SRA IDs for each record if found, can be formatted and saved in a second le (e.g., geo _ details.txt), which can serve as a convenient reference for dataset exploration.
# Function to find SRA ID from GEO accession def find_sra_ids(geo_accession):
query = f"{geo_accession} AND transcriptomic" handle = Entrez.esearch(db="sra", term=query, retmax=100) record = Entrez.read(handle) handle.close() return record["IdList"]
The fi n d _ sr a _ id s() function searches for corresponding SRA IDs based on the GEO accession number, allowing researchers to directly link to the raw sequencing data that can be used for downstream RNA-Seq analysis. The SRA IDs can be used to download the RNA-Seq raw data using fasterq-dump as described above.
# Search GEO for RNA-Seq datasets related to autoimmune disease query = "RNA-Seq AND Systemic Lupus Erythematosus AND human[ORGN]" geo_ids = search_geo(query, retmax=20) # Save GEO IDs to a file with open("geo_ids.txt", "w") as f:
for geo_id in geo_ids:
f.write(geo_id + "\n") print(f"Found {len(geo_ids)} GEO dataset IDs. Saved to geo_ids.txt") # Fetch dataset details and find SRA IDs geo_details_list = [] sra_mappings = {} for geo_id in geo_ids:
details = fetch_geo_details(geo_id)
121 Bioinformatics Databases
if details:
accession = details["Accession"]
sra_ids = find_sra_ids(accession)
sra_mappings[accession] = sra_ids
geo_details_list.append(f"Dataset ID: {geo_id}\n"
f"Title: {details['title']}\n" f"Summary: {details['summary']}\n" f"Accession: {accession}\n" f"Type: {details['gdsType']}\n" f"SRA IDs: {', '.join(sra_ids)
if sra_ids else 'None'}\n"
"--------------------------\n")
time.sleep(1) # To avoid NCBI rate limits # Save dataset details to a file with open("geo_details.txt", "w", encoding="utf-8") as f:
f.writelines(geo_details_list)
The script outputs two primary les: one containing the GEO dataset IDs and another with detailed dataset descriptions, including their corresponding SRA IDs when available. These outputs help researchers lter and select datasets without manually navigating through NCBI. The inclusion of SRA IDs enables easy access to raw sequence data, which can be processed using bioinformat­ics tools such as FastQC, Trimmomatic for quality control, STAR for alignment, and DESeq2 for differential gene expression analysis. By automating the search and retrieval process, the script streamlines the initial steps of RNA-Seq data analysis.
Future improvements could include automating the download of SRA datasets using the SRA Toolkit, integrating GEOparse for in-depth metadata analysis, or implementing machine learning­based ltering to prioritize datasets based on specic disease subtypes or sequencing depth. Additionally, the script could be expanded to query other NCBI databases, such as PubMed, for related publications or further rene search terms to retrieve datasets with specic experimen­tal conditions. These enhancements would provide a more comprehensive and efcient approach to studying autoimmune diseases using transcriptomics. The complete Python script, 'ncbi _ geo _ search.py’, is provided as supplementary material.
4.2.1.2.5 Searching NCBI dbSNPs for Gene Associations in Autoimmune Disease
Searching the dbSNP database for SNPs linked to a specic gene associated with autoimmune dis­eases serves several critical purposes in genetics, immunology, and clinical research. Autoimmune diseases often have a strong genetic component, with specic variants in immune-related genes inuencing susceptibility, disease progression, and treatment response.
By extracting dbSNPs linked to a specic gene, researchers can identify genetic variants that may play a role in immune system dysfunction. Many autoimmune diseases are associated with polymorphisms in genes encoding immune regulators, such as HLA genes, cytokine receptors, and transcription factors involved in inammation and immune signaling. Searching dbSNP allows researchers to pinpoint which SNPs are present in a gene of interest, determine their functional consequences, and assess whether they may alter protein function or gene expression in ways that contribute to disease.
The functional consequence of an SNP (such as missense mutations, regulatory variants, or splicing alterations) provides insights into how genetic differences inuence immune responses. Variants in autoimmune disease-associated genes can lead to overactive immune responses, loss of immune tolerance, or impaired signaling pathways, all of which contribute to autoimmune pathol­ogy. By searching dbSNP, researchers can prioritize SNPs for further investigation based on their predicted impact, frequency in different populations, and previous disease associations.
122 Bioinformatics of Autoimmune Diseases
Number of minor allelesinthe population
MA
The minor allele frequency (MAF) data from dbSNP is particularly useful in distinguishing common polymorphisms from rare disease-associated mutations. The minor allele is the less com­mon variant of a genetic locus (usually an SNP) in a given population. For example, if at a location, there are two possible alleles (say, A and G), and A is present in 80% of chromosomes in the popula­tion, and G is present in 20%, then G is the minor allele, because it is less frequent. The frequency of the minor allele is known as the MAF. The MAF for such biallelic locus (A and G) is calculated as follows:
F =
2× Total numberofindividualsinthe population
If an SNP is rare in the general population but enriched in autoimmune disease patients, it may serve as a disease risk factor or a potential biomarker for diagnosis. Conversely, if a variant is highly prevalent but only weakly associated with disease, it may reect general population variability rather than a causal factor.
The HGVS notation and canonical SPDI data obtained from dbSNP help ensure that SNPs can be cross-referenced with other genomic datasets, including GWAS, ClinVar (for clinical signi­cance), and Ensembl (for gene regulation effects). Canonical SPDI refers to a standardized represen­tation of genetic variants used by NCBI to provide a consistent, unambiguous, and reference-based way to describe sequence variations across different databases and annotations (SPDI stands for S: sequence ID. P: position (where the variant starts), D: deleted sequence (sequence removed at the position), I: inserted sequence (sequence inserted at the position)). Researchers can use this information to validate ndings, compare autoimmune disease-associated SNPs across studies, and correlate specic variants with disease severity, treatment response, or comorbidities.
In a clinical setting, identifying disease-linked SNPs through dbSNP searches can help develop genetic tests that predict an individual’s risk of developing an autoimmune disease. Personalized medicine approaches use such variant data to tailor treatments, selecting immunotherapies based on a patient’s genetic prole to optimize efcacy and minimize adverse effects.
Ultimately, searching dbSNP for gene-specic SNPs in autoimmune disease research enables scientists to identify potential genetic markers, understand disease mechanisms, and contribute to precision medicine approaches, paving the way for better diagnostics, targeted therapies, and improved patient outcomes.
The “ncbi _ dbSNPs.py ” Python script is designed to retrieve comprehensive variant data from the NCBI dbSNP database for a given gene ID. It rst queries the NCBI database using Entrez to identify all dbSNP IDs associated with the specied gene. For each SNP ID, the script fetches detailed variant information in XML format and parses key attributes such as variant type,
alleles, chromosome number, canonical SPDI notation, gene name, functional consequence, vali­dation status, MAF, and HGVS notation. To ensure clarity in data representation, multi-value elds
such as Canonical_SPDI, Functional_Consequence, MAF, and HGVS are separated using the pipe (|) character instead of commas. The script outputs all extracted information in a structured CSV le, making it suitable for further bioinformatics analysis.
A critical feature of this script is its ability to handle complex XML structures, including namespace-based parsing, ensuring robust data extraction even when SNP records contain multiple associated genes, alternative allele notations, or different functional annotations. It also accounts for missing data, replacing absent values with “N/A” to maintain consistency in the dataset. Additionally, the script implements time delays between API requests to prevent overloading NCBI servers, making it scalable for large-scale variant analysis across multiple genes.
This script is particularly useful for autoimmune disease research, as it enables rapid identica­tion of genetic variants in genes implicated in immune system regulation and disease susceptibility. Autoimmune diseases often have a strong genetic component, with specic SNPs linked to altered immune responses, inammatory pathways, and disease risk. By analyzing functional consequences
123 Bioinformatics Databases
and allele frequencies, researchers can prioritize candidate SNPs for further study. The inclusion of MAF values provides insights into how common a variant is in different populations, helping to distinguish between rare mutations and common polymorphisms. The structured CSV output can be integrated into bioinformatics pipelines for association studies, machine learning analyses, and cross-referencing with clinical datasets. Ultimately, this tool helps researchers pinpoint potential genetic markers of autoimmune diseases, aiding in early diagnosis, risk prediction, and the develop­ment of targeted therapies.
4.2.1.2.6 Searching NCBI dbVars for Gene Associations in Autoimmune Diseases
dbVar is a crucial database for studying structural variations in the human genome, and its signi­cance in autoimmune diseases cannot be understated. Autoimmune disorders are often associated with genetic variations that alter immune system function. Structural variations, including dele­tions, duplications, and insertions, can impact genes involved in immune regulation, antigen presen­tation, and inammatory responses. By leveraging dbVar, researchers can identify these structural changes, correlate them with disease phenotypes, and gain deeper insights into the genetic basis of autoimmune diseases.
The “ncbi _ dbVars.py ” script provided is designed to retrieve and process dbVar data asso- ciated with a given gene symbol. It rst queries the NCBI E-Utils API to obtain dbVar IDs for the specied gene. Then, it fetches detailed information for each variant using the retrieved dbVar IDs, ltering out entries where the object type is not classied as a variant. The script processes the data to ensure consistency, replacing missing values with “N/A” and formatting dictionary entries by converting internal commas into semicolons to maintain CSV readability. The output is stored in a CSV le containing various attributes of each variant, such as variant region ID, type, study details, associated species, clinical signicance, and related genes.
The resulting CSV le provides a structured dataset where each row corresponds to a structural variant associated with the specied gene. The columns include essential information such as the variant’s unique ID, its classication, the study from which it originates, its prevalence, and any clinical implications. Fields that may contain multiple values, such as associated genes or study methods, are separated by a pipe (“|”) character to maintain clarity. This structured format enables researchers to efciently analyze and interpret genetic variations linked to autoimmune diseases, facilitating further exploration of their pathogenic roles and potential therapeutic targets.
The output generated by the script provides a structured dataset of structural variations (dbVars) associated with a specied gene, which can be used to study the genetic basis of autoimmune diseases. By analyzing the CSV le, researchers can identify structural variations affecting genes known to be involved in immune system regulation, antigen presentation, and inammatory responses. The presence of structural variants in key immune-related genes could indicate potential mechanisms contributing to autoimmune conditions.
The dataset contains crucial information, including variant region IDs, associated studies, species, clinical signicance, and related genes. The “Study _ Type” column, when available, provides context on how the variant was identied, such as through case-control studies, which compare affected individuals to healthy controls. The “Variant _ Count” column indicates the number of reported occurrences of the variation, which can help assess its prevalence in auto­immune disease cases. The “Clinical _ Significance” eld can provide direct insight into whether the variant has been implicated in disease pathology. By ltering for clinically signicant variants, researchers can prioritize which structural variations warrant further investigation.
Additionally, the dataset’s inclusion of submitted and remapped genome assemblies allows researchers to analyze variants across different human genome builds (e.g., GRCh37 and GRCh38), ensuring compatibility with different genomic analysis pipelines. The ability to iden­tify genes affected by structural variants through the “Genes” column enables researchers to cross-reference known autoimmune disease genes and examine potential gene disruptions or regulatory changes.