RNAseq

Read and merge multiple files by folder

Often the data we need is spread out across multiple files, and we need a way to read all the files and merge the content.The goal is to generate a tidy data frame.Tidy data have variables in columns and observations in rows. Here I demonstrate how to gather data from multiple files into a tidy dataset from; 1- A folder with one file pr measurement. 2- A folder where you have one file pr sample with multiple measurements. 3- A folder using regex to select specific files. 4- Show off some superpowers by applying this in creating a function to merge a folder of VCF files into one long data frame.

Calculate Z-Score and plot heatmaps

Z-score is a measure for how values deviates from the mean in a given population. Calculating z-score is a handy way to standardize, or normalize data. This kind of normalization is frequently used in gene expression studies to visualize heat maps of differential expressed genes.