Make a small program’s behaviour inspectable →
Use a concrete input and expected outcome to explain a technical choice.
Technology and digital projects
A first bioinformatics portfolio project should make its inputs, calculation and limits inspectable. A small reproducible result is more persuasive than a notebook full of unexplained charts.
This JavaScript example reports GC percentage among A, C, G and T, while counting ambiguous symbols separately. It uses synthetic sequences, not patient data or a biological discovery claim.
Save this complete synthetic example as sample.fasta.
>sample_a
ACGTNN
>sample_b
GGCCTA
Save as gc-summary.mjs; run with Node.js: node gc-summary.mjs sample.fasta.
NCBI documents FASTA headers and nucleotide symbols. This teaching script accepts standard DNA ambiguity letters but excludes ambiguous positions from the GC denominator; other analyses may choose a different convention.
import { readFileSync } from 'node:fs';
const text = readFileSync(process.argv[2], 'utf8');
const records = [];
let current;
for (const raw of text.split(/\r?\n/)) {
const line = raw.trim();
if (!line) continue;
if (line.startsWith('>')) {
const id = line.slice(1).split(/\s+/)[0];
if (!id || records.some(r => r.id === id)) throw Error('Missing or duplicate ID');
current = { id, sequence: '' };
records.push(current);
} else {
if (!current) throw Error('Sequence before header');
const sequence = line.toUpperCase();
if (!/^[ACGTRYSWKMBDHVN]+$/.test(sequence)) throw Error('Unsupported symbol');
current.sequence += sequence;
}
}
if (!records.length) throw Error('No sequences');
console.log('id,total,canonical,ambiguous,gc_percent');
for (const { id, sequence } of records) {
if (!sequence.length) throw Error('Empty sequence: ' + id);
const canonical = (sequence.match(/[ACGT]/g) || []).length;
const gc = (sequence.match(/[GC]/g) || []).length;
const percent = canonical ? (100 * gc / canonical).toFixed(2) : 'NA';
console.log([id, sequence.length, canonical, sequence.length - canonical, percent].join(','));
}The result is a calculation to verify, not a genome-quality verdict.
id,total,canonical,ambiguous,gc_percent
sample_a,6,4,2,50.00
sample_b,6,6,0,66.67For sample_a, G and C occupy two of the four canonical positions. Reporting 33.33% would use all six positions instead, so the denominator changes the meaning.
A Bioinformatics Developer should show what happens with an all-ambiguous sequence, an empty record and a duplicate identifier. This script returns NA for the first and rejects the latter two.
Computational biology includes the provenance and the failure cases.
For a larger genome sequencing dataset, document its source, accession or release, licence and file checksum. This example reads the whole file into memory and uses a simple duplicate check; it is deliberately not a production pipeline for large genomes.
If you are exploring Bioinformatics as a career in India, use the project to demonstrate reproducibility and reasoning rather than promising that one exercise qualifies you for Jobs. Show a meaningful next step, such as streaming input and validating against another documented tool.
Open the source for the part you want to examine further.
External reference · ncbi.nlm.nih.gov
Use the repository’s format guidance; the sample sequences and script here are original.
External reference · nodejs.org
Reference for the built-in file-reading API used in the example.