Skip to content

Commit

Permalink
routine sync
Browse files Browse the repository at this point in the history
  • Loading branch information
igordot committed Apr 13, 2017
1 parent bf7a22d commit 26f2b2e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
3 changes: 2 additions & 1 deletion gather-fastqs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ sub main {
}

# find fastqs in given directory
my $find_fastq_cmd = 'find -L ' . $search_dir . ' -maxdepth 2 -type f -name "*_R1*.fastq.gz" -or -name "*_1.fastq.gz" | LC_ALL=C sort';
my $find_fastq_cmd_names = "-name '*_R1_0*.fastq.gz' -or -name '*_R1.fastq.gz' -or -name '*_1.fastq.gz'";
my $find_fastq_cmd = "find -L $search_dir -maxdepth 2 -type f $find_fastq_cmd_names | LC_ALL=C sort";
my @fastqs = `$find_fastq_cmd`;

# counter single and paired reads
Expand Down
2 changes: 1 addition & 1 deletion scripts/dge-deseq2.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


# increase output width
options(width = 150)
options(width = 120)

# java heap size
options(java.parameters = "-Xmx8G")
Expand Down
2 changes: 1 addition & 1 deletion segments/align-bwa-mem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fi

module load bwa/0.7.13

sambamba_bin="/ifs/home/id460/bin/sambamba"
sambamba_bin="/ifs/home/id460/software/sambamba/sambamba_v0.6.6"

echo " * bwa: $(readlink -f $(which bwa)) "
echo " * bwa version: $(bwa 2>&1 | grep -m 1 'Version') "
Expand Down
6 changes: 3 additions & 3 deletions segments/bam-dedup-sambamba.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fi

# sambamba markdup

sambamba_bin="/ifs/home/id460/bin/sambamba"
sambamba_bin="/ifs/home/id460/software/sambamba/sambamba_v0.6.6"

echo " * sambamba: $(readlink -f $(which $sambamba_bin)) "
echo " * sambamba version: $($sambamba_bin 2>&1 | head -1) "
Expand All @@ -88,8 +88,8 @@ bash_cmd="
$sambamba_bin markdup \
--remove-duplicates \
--nthreads $threads \
--hash-table-size 1500000 \
--overflow-list-size 1500000 \
--hash-table-size 525000 \
--overflow-list-size 525000 \
$bam \
$bam_dd \
2> $bam_dd_log
Expand Down
16 changes: 16 additions & 0 deletions segments/fastq-clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,22 @@ cat ${summary_dir}/*.${segment_name}.csv | LC_ALL=C sort -t ',' -k1,1 | uniq > "
#########################


# exit if FASTQ has very few reads

if [ $reads_R1 -lt 10000 ] ; then
echo -e "\n $script_name ERROR: FASTQ $fastq_R1_clean IS TOO SHORT \n" >&2
# delete FASTQs since they are not useable
rm -fv "$fastq_R1_clean"
if [ -s "$fastq_R2_clean" ] ; then
rm -fv "$fastq_R2_clean"
fi
exit 1
fi


#########################


# add sample and FASTQ to sample sheet
echo "${sample},${fastq_R1_clean},${fastq_R2_clean}" >> "$samples_csv_clean"

Expand Down

0 comments on commit 26f2b2e

Please sign in to comment.