Skip to content

Commit

Permalink
modified: cre.bam.validate.sh
Browse files Browse the repository at this point in the history
	modified:   cre.sh
  • Loading branch information
naumenko-sa committed Aug 22, 2017
1 parent 21a0411 commit 7eb6f61
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cre.bam.validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#PBS -d .
#PBS -l vmem=20g,mem=20g

# thorough validation:
# https://gatkforums.broadinstitute.org/gatk/discussion/7571/errors-in-sam-bam-files-can-be-diagnosed-with-validatesamfile

if [ -z $bam ]
then
bam=$1
Expand Down
6 changes: 6 additions & 0 deletions cre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ function f_cleanup
for f in *ready.bam;do mv $f `echo $f | sed s/"-ready"//`;done;
for f in *ready.bam.bai;do mv $f `echo $f | sed s/"-ready"//`;done;

#make bam files read only
for f in *.bam;do chmod 444 $f;done;

#calculate md5 sums
for f in *.bam;do md5sum $f > $f.md5;done;

#validate bam files
for f in *.bam;do cre.bam.validate.sh $f;done;

Expand Down

0 comments on commit 7eb6f61

Please sign in to comment.