Short scripts for various bioinformatics applications.
- Clone or copy raw code to text editor.
- Make executable, e.g.
chmod u+x removeChrom
. - Call script via installation dir, e.g.
./removeChrom
or/home/usr/bin/removeChrom
, or alternatively... - (Optional) Carefully add installation dir to PATH, e.g.
export PATH=$PATH:/home/usr/bin
and call anywhere via simplyremoveChrom
.
R functions to automate Broad GCT format generation, for downstream use with Broad GSEA functions via GenePattern, etc.
For more details: Broad GenePattern File Formats Guide
Input is a matrix with genes as rownames and samples as colnames.
format.gct()
usage: format.gct(primary_tumors_matrix)
write.gct()
usage: write.gct(primary_tumors_matrix, "primary_tumors.gct")
or simply write.gct(primary_tumors_matrix)
Simple bash script to remove reads from a specific chromosome from a bam file. Dependencies: samtools.
Usage: removeChrom chr10 input.bam
Command idea based on this Biostars thread. Script format based on Tao Liu's bdg2bw.
Simple bash script to remove reads from a specific chromosome from a bam file (output as sam). Dependencies: samtools.
Usage: removeChromSam chr10 input.bam
Command idea based on this Biostars thread. Script format based on Tao Liu's bdg2bw.
Shell script to sort (in a file) each row of integers horizontally by increasing value. Specific application: converting standard BEDPE files to minimal format for macs2.
Usage: bash sort.sh coords.bed > coords.sorted.bed
Loop sourced from this thread.