Assignment 12

 

Assignment 12: My R Markdown Primer: Bioinformatics Workflow

Objectives

I explored R Markdown and its capabilities for creating reproducible reports, particularly in bioinformatics. R Markdown allows you to combine narrative text, code, and output in a single document, which is especially useful for RNA-Seq analyses where workflows can be complex and data-intensive.

I practiced:

  • Writing narrative text with headings, bullet points, and emphasis.

  • Using inline and displayed LaTeX equations, for example, the Hardy-Weinberg equilibrium:

Inline: $p^2 + 2pq + q^2 = 1$
Displayed:

p2+2pq+q2=1p^2 + 2pq + q^2 = 1

This helped me document mathematical models used in bioinformatics clearly.

Integration of Code and Narrative

  • I loaded the airway RNA-Seq dataset from Bioconductor.

  • Converted it into a DESeq2 object and performed variance stabilizing transformation (VST).

  • Conducted PCA analysis to visualize sample clustering.

  • All of this was embedded directly in the R Markdown document so results appear alongside the code.

This seamless integration ensures that any changes in code automatically update outputs in the final report.

Challenges

  • Installing Bioconductor packages like DESeq2 and airway on my Mac required careful version management.

  • Applying custom CSS styling was tricky; I had to specify the full path to the styles.css file for it to render correctly.

Reflection

Using R Markdown for bioinformatics has several advantages:

  • Reproducibility: All analysis steps are captured in one document.

  • Clarity: Narrative, code, and plots are linked directly.

  • Collaboration: Sharing the .Rmd file allows colleagues to rerun analyses easily.

  • Visualization: Plots such as PCA are embedded in-line, providing immediate visual feedback.

Compared to traditional static reports, this approach reduces errors and improves documentation quality.


Figure: PCA of RNA-Seq Samples

Conclusion

This assignment helped me:

  • Understand R Markdown syntax and document structure.

  • Apply bioinformatics workflows in a reproducible manner.

  • Generate HTML reports with embedded plots and styled output.

The combination of narrative text, LaTeX math, and code makes R Markdown a powerful tool for bioinformatics reporting.

Links and References

Comments

Popular posts from this blog

Assignment 5

Assignment 6

Assignment 2