Skip to content
Snippets Groups Projects
Commit ca4a97e2 authored by Brandi Cantarel's avatar Brandi Cantarel
Browse files

merging master branch changes

parents 4f642d9c 56d8030e
Branches
Tags
No related merge requests found
......@@ -8,11 +8,12 @@ usage() {
echo "-n --NucType"
echo "-p --Prefix for output file name"
echo "-c --Capture Bedfile"
echo "-d --RemoveDuplicates 1=yes, 0=no default=no"
echo "Example: bash bamqc.sh -p prefix -r /project/shared/bicf_workflow_ref/human/GRCh38 -b SRR1551047.bam -n dna -c target.bed"
exit 1
}
OPTIND=1 # Reset OPTIND
while getopts :r:b:c:n:p:h opt
while getopts :r:b:c:n:p:d:h opt
do
case $opt in
r) index_path=$OPTARG;;
......@@ -20,6 +21,7 @@ do
c) bed=$OPTARG;;
n) nuctype=$OPTARG;;
p) pair_id=$OPTARG;;
d) dedup=$OPTARG;;
h) usage;;
esac
done
......@@ -42,6 +44,12 @@ then
SLURM_CPUS_ON_NODE=1
fi
if [[ $dedup == 1 ]]
then
mv $sbam ori.bam
samtools view -@ $SLURM_CPUS_ON_NODE -F 1024 -b -o ${sbam} ori.bam
fi
if [[ $nuctype == 'dna' ]]; then
module load bedtools/2.26.0 picard/2.10.3
samtools view -@ $SLURM_CPUS_ON_NODE -b -L ${bed} -o ${pair_id}.ontarget.bam ${sbam}
......
......@@ -106,8 +106,9 @@ for (i in 1:a) {
if (textscale < 0.1) {
textscale <- 0.1
}
zscores2 = as.matrix(zscores[rowSums(!is.na(zscores))!=0, colSums(!is.na(zscores))!=0])
png(file=paste(cond[i],'_',cond[j],'.heatmap.deseq2.png',sep=""),height=768,width=1024)
heatmap.2(zscores, col = bluered(100),Rowv = as.dendrogram(STREE), RowSideColors = col.blocks,dendrogram='row', cexCol=textscale,labCol=s$symbol,srtRow=45,srtCol=45,trace="none", margins=c(5, 5))
heatmap.2(zscores2, col = bluered(100),Rowv = as.dendrogram(STREE), RowSideColors = col.blocks,dendrogram='row', cexCol=textscale,labCol=s$symbol,srtRow=45,srtCol=45,trace="none", margins=c(5, 5))
legend("topright",legend=grpnames,col=rainbow(length(grpnames)),pch=20,cex=0.5)
dev.off()
}
......@@ -160,8 +161,9 @@ for (i in 1:a) {
if (textscale < 0.1) {
textscale <- 0.1
}
zscores2 = as.matrix(zscores[rowSums(!is.na(zscores))!=0, colSums(!is.na(zscores))!=0])
png(file=paste(cond[i],'_',cond[j],'.heatmap.edgeR.png',sep=""),height=768,width=1024)
heatmap.2(zscores, col = bluered(100),Rowv = as.dendrogram(STREE), RowSideColors = col.blocks,dendrogram='row', cexCol=textscale,labCol=s$symbol,srtRow=45,srtCol=45,trace="none", margins=c(5, 5))
heatmap.2(zscores2, col = bluered(100),Rowv = as.dendrogram(STREE), RowSideColors = col.blocks,dendrogram='row', cexCol=textscale,labCol=s$symbol,srtRow=45,srtCol=45,trace="none", margins=c(5, 5))
legend("topright",legend=grpnames,col=rainbow(length(grpnames)),pch=20,cex=0.5)
dev.off()
gcont <- paste(cond[j],cond[i],sep='-')
......
......@@ -94,6 +94,9 @@ foreach $file (@files) {
$keepforvcf = $gene;
}
next unless $keepforvcf;
if ($tumormaf[0] < 0.1) {
next unless ($outfile =~ m/pindel_tandemdup/);
}
my @fail = sort {$a cmp $b} keys %fail;
next if (scalar(@fail) > 0);
my @nannot;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment