Telomere Discovery PipelineFrom Raw Sequence Data to Targeted BLAST Hits
Overview
Modern high-throughput sequencing generates gigabytes of raw data. To locate specific biological motifs—such as canonical telomeric repeat sequences (TTTAGGG)—without reading through millions of lines manually, we follow a standard bioinformatics protocol: Fetch → Format → Index → Query → Parse.
Pipeline Stages & Terminal Commands
Stage 1: Downloading Raw Sequencing Data (SRA)
Raw sequencing runs stored in the NCBI Sequence Read Archive (SRA) are retrieved using their unique accessions (e.g., SRR384905).
prefetch SRR384905 |
prefetch: A tool from NCBI's SRA Toolkit that safely downloads the raw, compressed .sra archive file to your local computer.
Stage 2: Converting SRA Archives to FASTQ Format
Raw .sra files must be extracted into standard text formats containing sequence reads along with their base-calling quality scores.
fastq-dump --split-files SRR384905 |
fastq-dump: Extracts sequence data from the .sra container.
--split-files: Separates paired-end sequencing reads into two individual files (SRR384905_1.fastq and SRR384905_2.fastq).
Stage 3: Converting FASTQ to FASTA Format
While FASTQ files contain quality scores (4 lines per read), sequence alignment search tools like BLAST run significantly faster using FASTA files (2 lines per read: header and sequence).
seqkit fq2fa SRR384905_1.fastq -o SRR384905_1.fasta |
seqkit fq2fa: Strips quality lines from FASTQ reads and outputs clean FASTA sequence headers.
-o SRR384905_1.fasta: Designates the output FASTA file name.
Stage 4: Creating a Searchable BLAST Database
BLAST cannot efficiently search through plain text files line-by-line. We first build binary index files from our subject sequence (SRR384905_1.fasta).
makeblastdb -in SRR384905_1.fasta -dbtype nucl -out SRR384905_db |
· makeblastdb: Constructs the binary search index.
· -in SRR384905_1.fasta: Specifies the target input FASTA file.
· -dbtype nucl: Informs the system that the sequence type is nucleotide (DNA/RNA).
· -out SRR384905_db: Assigns the prefix name for the output database files (.nhr, .nin, .nsq, etc.).
Stage 5: Constructing the Telomere Query Motif File
We create a criteria file (query_telomere.fasta) containing forward and reverse plant telomeric tandem repeat units.
cat << 'EOF' > query_telomere.fasta >Plant_Telomere_Repeat_Forward TTTAGGGTTTAGGGTTTAGGGTTTAGGGTTTAGGG >Plant_Telomere_Repeat_Reverse CCCTAAACCCTAAACCCTAAACCCTAAACCCTAAA EOF |
· cat << 'EOF' > filename: Writes multi-line text directly into a new file until reaching the EOF tag.
Stage 6: Running blastn and Capturing Output
We execute a local nucleotide search to find reads matching our query motif and dump the results directly into a designated tabular file.
blastn -query query_telomere.fasta -db SRR384905_db -out blast_results.txt -outfmt 6 -task blastn-short |
· blastn: Nucleotide-to-nucleotide BLAST search program.
· -query query_telomere.fasta: Input target motif sequence.
· -db SRR384905_db: Target formatted database.
· -out blast_results.txt: Redirects alignment results into a clear text file.
· -outfmt 6: Formats output as a tab-delimited table (12 standard columns including query ID, subject ID, % identity, alignment length, and e-value).
· -task blastn-short: Optimizes word size and scoring parameters specifically for short motifs (< 30–50 bp).
Stage 7: Verifying Total Hits
Finally, we inspect the total number of aligned matches produced by counting the lines in our output table:
wc -l blast_results.txt |
· wc -l: Word count with the line flag (-l), which yielded 638 matching reads.
Conclusion & Core Concept
I have successfully learned how to obtain raw public genomic repositories, transform file formats according to analytical requirements, build fast index structures, and execute custom motif searches to store matched reads into output files for further research.


Comments