Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
francoiskroll authored Apr 15, 2022
1 parent c393350 commit 8ac3964
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
10 changes: 10 additions & 0 deletions utilities/numberReadsFastqGz.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 100720
# returns number of reads in a fastq file

# usage: numberReadsFastq.command XXX.fastq

#!/bin/bash

FASTQGZ="$1"

zcat < $FASTQGZ | echo $((`wc -l`/4))
50 changes: 50 additions & 0 deletions utilities/runSnifflesloop.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

# run Sniffles on a folder of BAM files

mkdir SVs_sniffles/vcf

for i in promoterbamfilt/*.bam # loop thru files in directory that finish by .bam
do

BAM="$i"

PDG="$(echo "$BAM" | cut -d'_' -f 1 | cut -d'/' -f 2)" # everything before '_', then everything after '/'
# e.g. promoterbamfilt/55052_promoterSnif.vcf >> promoterbamfilt/55052, then 55052

VCF="$(echo $"SVs_sniffles/vcf/"$PDG$"_promoterSnif.vcf")"


echo "---- [ SNIFFING PROMOTER "$" $BAM ] ----"

sniffles --mapped_reads "$BAM" \
--vcf "$VCF" \
--genotype \
--min_support 10 \
--min_length 10 \
--max_distance 50

done

######

for i in bamfilt/*.bam # loop thru files in directory that finish by .bam
do

BAM="$i"

PDG="$(echo "$BAM" | cut -d'_' -f 1 | cut -d'/' -f 2)" # everything before '_', then everything after '/'
# e.g. bamfilt/55052_promoterSnif.vcf >> promoterbamfilt/55052, then 55052

VCF="$(echo $"SVs_sniffles/vcf/"$PDG$"_bodySnif.vcf")"

echo "---- [ SNIFFING GENEBODY "$" $BAM ] ----"

sniffles --mapped_reads "$BAM" \
--vcf "$VCF" \
--genotype \
--min_support 300 \
--min_length 20 \
--max_distance 50

done

0 comments on commit 8ac3964

Please sign in to comment.