diff --git a/alignment/bamqc.sh b/alignment/bamqc.sh
index 029a921d4f13e70325c598c61321f1dcbe270eab..91ddb959070c920c788b1b8a0d1bcfabb836d07c 100644
--- a/alignment/bamqc.sh
+++ b/alignment/bamqc.sh
@@ -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}
diff --git a/genect_rnaseq/dea.R b/genect_rnaseq/dea.R
index 058dd1817f6d448baf3a9c84fdd22f8fc197ad3b..3d845632985875a6834a5f82f1dfdea206e1c9dd 100755
--- a/genect_rnaseq/dea.R
+++ b/genect_rnaseq/dea.R
@@ -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='-')
diff --git a/variants/filter_pindel.pl b/variants/filter_pindel.pl
index 07ee4000a36277a4e7f48e2d2e64bd56fa5f8578..7e56a75aaf2ddd188b4b7f0a50831f39b449424c 100644
--- a/variants/filter_pindel.pl
+++ b/variants/filter_pindel.pl
@@ -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;