How to use the command elink (with examples)
- Linux
- November 5, 2023
The elink
command is part of the edirect
package and is used to look up precomputed neighbors within a database or find associated records in other databases. It is commonly used in bioinformatics research to retrieve related information from various databases. The elink
command is a powerful tool that can help researchers explore connections between different types of data and discover valuable insights.
Use case 1: Search pubmed then find related sequences
Code:
esearch -db pubmed -query "selective serotonin reuptake inhibitor" | elink -target nuccore
Motivation: The motivation behind this use case is to find related sequences in the nucleotide database for a given search query in the PubMed database. This can be useful for researchers studying the genetic aspects of a particular topic, such as the relationship between certain drugs and specific gene sequences.
Explanation:
esearch -db pubmed -query "selective serotonin reuptake inhibitor"
: This command performs a search in the PubMed database for the specified query, which in this case is “selective serotonin reuptake inhibitor”.| elink -target nuccore
: The pipe operator|
is used to pass the output of the previousesearch
command as input to theelink
command. The-target nuccore
argument specifies that the related sequences should be searched in the nuccore database.
Example Output: The output of this command will be a list of related sequences in the nucleotide database that are associated with the search query “selective serotonin reuptake inhibitor” in the PubMed database. This can include gene sequences and other genetic information related to the query.
Use case 2: Search nucleotide then find related biosamples
Code:
esearch -db nuccore -query "insulin [PROT] AND rodents [ORGN]" | elink -target biosample
Motivation: This use case is motivated by the need to find related biosamples in the biosample database for a specific search query in the nucleotide database. Researchers studying the relationship between certain proteins and rodents may need to access biosamples that contain relevant data for their research.
Explanation:
esearch -db nuccore -query "insulin [PROT] AND rodents [ORGN]"
: This command performs a search in the nucleotide database for the specified query, which in this case is “insulin [PROT] AND rodents [ORGN]”. The[PROT]
and[ORGN]
tags specify that the search should be limited to proteins and organisms, respectively.| elink -target biosample
: The pipe operator|
is used to pass the output of the previousesearch
command as input to theelink
command. The-target biosample
argument specifies that the related biosamples should be searched in the biosample database.
Example Output: The output of this command will be a list of related biosamples in the biosample database that are associated with the search query “insulin [PROT] AND rodents [ORGN]” in the nucleotide database. This can include information about the biosamples, such as the organism, tissue, and experimental conditions.
Conclusion:
The elink
command is a versatile tool for exploring connections and retrieving related data from different databases. By combining it with other edirect
commands, researchers can easily navigate through various types of data and extract valuable information for their research. The examples provided demonstrate how to search for related sequences in the nucleotide database and related biosamples in the biosample database using the elink
command. These use cases highlight the power and flexibility of the elink
command in bioinformatics research.