Practical 4: Genomics, systems biology and multi-omics
Learning objectives
Compute aligned identity with a stated denominator; explore a composition-preserving shuffle comparison; distinguish similarity, homology and function.
Biological question and data
Does a high number of matching bases provide enough evidence to claim common ancestry or shared function?
Two supplied short sequences are compared at corresponding positions without gaps. A shuffle calculation conditions on one sequence’s base composition; it is a restricted teaching null, not BLAST or an evolutionary test.
No biological download is required. Numerical inputs are hypothetical, not observed animal data. The runnable examples use base R. Count and abundance units are specified where used.
1. Measure identity
The sequences have equal length. Record both matches and denominator.
Show R code
a <-strsplit("ACGTACGTACGTACGT","")[[1]]b <-strsplit("ACGTACGTTCGTACGA","")[[1]]stopifnot(length(a)==length(b))observed <-sum(a==b)c(matches=observed,length=length(a),identity=observed/length(a))
matches length identity
14.000 16.000 0.875
Show R code
stopifnot(observed==14)
Fourteen of sixteen corresponding bases match in this supplied alignment.
2. Compare a restricted shuffle null
Shuffle the second sequence without changing composition. Include the usual plus-one Monte Carlo tail convention.
hist(shuffled,breaks=seq(-.5,16.5,1),xlab="Matches under composition shuffle",main="Restricted teaching null")abline(v=observed,col="#d95f02",lwd=2)
This comparison shows what positional matches look like after a particular randomization. It ignores database size, local-alignment selection, substitution models and sequence dependence.
3. Separate claims
Place each claim beside the extra evidence it needs.
claim evidence
1 sequence similarity explicit aligned comparison
2 homology ancestry inference with appropriate context
3 shared function functional/domain/experimental evidence
Homology is a relationship of common ancestry, not 87.5% homology. Shared function is a further biological claim.
4. Compare complexity as well as identity
A composition-preserving shuffle of an all-A sequence always produces the same sequence. High identity in that case supplies no unusual positional agreement under this restricted null.
The earlier comparison used one supplied alignment. A database search selects promising local regions from many candidates. Its significance calculation must account for its scoring and search setting; the toy shuffle tail omits that selection. Changing sequence length, complexity or database size can change the meaning of the same identity percentage.
A useful result description gives matches, comparable positions, coverage and comparison context. A functional claim additionally needs domain, evolutionary and experimental evidence. Do not replace that evidence with the word homology expressed as a percentage.
Interpretation challenge
Would increasing the number of shuffles make the toy tail a BLAST E-value?
Suggested reasoning
No. More draws improve Monte Carlo resolution for the same restricted null. They do not add the database-search scoring and selection model needed for an E-value.
Interpretation and limits
Use the NCBI BLAST glossary to distinguish identity and homology. The toy shuffle tail is not a database-search E-value and cannot be substituted for one.
Exercises
Compare two all-A sequences. Why is high identity weak evidence here?
What is ignored by positional comparison when lengths differ?
Does a small shuffle tail establish function?
Suggested answers
Low complexity makes agreement unsurprising; the composition-preserving shuffle gives the same matches.
Alignment, indels and local-versus-global coverage must be specified.