Last active
August 29, 2015 14:24
-
-
Save gatoravi/9a9277cc0cdabf5c1dcf to your computer and use it in GitHub Desktop.
create_igv_batch_from_bed.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
#This script takes 2 arguments | |
#The first script is the BAM file | |
#The second is the BED file | |
bam=$1 | |
bed=$2 | |
awk -v bam=$bam 'BEGIN { print "new\ngenome hg19\nload "bam"\nsnapshotDirectory ./snapshots/" } { gsub("chr", "", $1); if(NR > 1) print "goto "$1"\t"$2-10"\t"$2+10"\nsort base\ncollapse\nsnapshot"; }' $bed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment