Skip to content

Commit

Permalink
perhaps mkfifo negatively impacted exported fx
Browse files Browse the repository at this point in the history
  • Loading branch information
aerijman committed Jan 6, 2025
1 parent 64bacb4 commit 8d293a8
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@ tmp="${pwd}/test_data/tmp"
[ -d "${tmp}" ] || mkdir -p "${tmp}"


# To be used later in the script #
# ------------------------------ #
gen_rand_seq() {
length=$1
LC_CTYPE=C tr -dc 'ACGT' < /dev/urandom | head -c ${length}
}
revcomp() {
echo $1 | rev | tr "[ATCGNatcgn]" "[TAGCNtagcn]"
}

export -f gen_rand_seq revcomp

# check conda is installed OR install it #
# -------------------------------------- #
if command -v conda &> /dev/null; then
Expand Down Expand Up @@ -78,6 +66,15 @@ rm tmp_fq
# ---------------------
echo ">chr_Human_autosome_chr1" > ${tmp}/reference.fa

gen_rand_seq() {
length=$1
LC_CTYPE=C tr -dc 'ACGT' < /dev/urandom | head -c ${length}
}
revcomp() {
echo $1 | rev | tr "[ATCGNatcgn]" "[TAGCNtagcn]"
}
export -f gen_rand_seq revcomp

samtools view ${tmp}/emseq-test.u.bam | \
cut -f10 | paste - - | \
awk -v gen_rand_seq="gen_rand_seq" -v revcomp="revcomp" 'BEGIN{srand()}{
Expand Down

0 comments on commit 8d293a8

Please sign in to comment.