Useful script for preprocessing FeatureCounts to DESeq
This is a useful script if you do RNAseq for multiple samples/conditions and have featureCounts (or HTSeq, Kallisto, etc.) output files located in different subfolders with only the subfolder name distinguishing samples/conditions.
Script will go into subfolders, copy the output files, give them the correct sample names, and create a master table for DESeq or EdgeR using the subfolder names and column you want to extract from the files.
# Find all files with extension $1 in subfolders and copy them into the current folder with changing the name of the file to their last subfolder plus .file ext