Last active
December 28, 2015 08:09
-
-
Save mtw/7469673 to your computer and use it in GitHub Desktop.
Wrapper for DEXseq read counting
This file contains 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 | |
samdir="./" | |
dexseq_flat_gff="my.DEXSeq.gff" | |
outdir="./dexseq-count" | |
dexseq_count="python /home/foo/bin/dexseq_count.py" | |
samtools=`which samtools` | |
if ! [ -d "$outdir" ]; | |
then | |
mkdir -p $outdir | |
fi | |
for BAM in $(ls $samdir/*.bam) | |
do | |
bn=$(basename $BAM .uniq.bam) | |
echo "processing" $bn.uniq.bam | |
set -x | |
$samtools sort -n -o $BAM $bn | $samtools view -h - | $dexseq_count -p yes -s no -r pos -f sam $dexseq_flat_gff - $outdir/$bn.dexseq.count 2> $outdir/$bn.dexseq.count.err | |
set +x | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment