#README
https://github.com/bcgsc/straglr
############################
############################
https://hpc.nih.gov/apps/python.html#envs
export TMPDIR=/lscratch/$SLURM_JOB_ID
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
bash Mambaforge-Linux-x86_64.sh -p /data/$USER/conda -b
rm Mambaforge-Linux-x86_64.sh
After sourcing the conda init file, activate the base environment and update the conda package manager which itself is just a package:
source /data/$USER/conda/etc/profile.d/conda.sh && source /data/$USER/conda/etc/profile.d/mamba.sh
mkdir -p ~/bin
cat <<'__EOF__' > ~/bin/myconda
__conda_setup="$('/data/$USER/conda/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/data/$USER/conda/etc/profile.d/conda.sh" ]; then
. "/data/$USER/conda/etc/profile.d/conda.sh"
else
export PATH="/data/$USER/conda/bin:$PATH"
fi
fi
unset __conda_setup
if [ -f "/data/$USER/conda/etc/profile.d/mamba.sh" ]; then
. "/data/$USER/conda/etc/profile.d/mamba.sh"
fi
__EOF__
source myconda
########################################################
########################################################
git clone https://github.com/bcgsc/straglr.git
cd straglr
conda env create --name straglr --file=environment.yaml
conda activate straglr
./straglr.py
######################
#####################
for i in *.bam
do
ff=`echo $i | sed 's/.sorted.bam//'`
straglr.py ${i} ~/Desktop/straglr_scoring_tool_for_long_read/toolinpus_and_HPRC_bams/hg38.fa ~/Desktop/straglr_scoring_tool_for_long_read/HPRC_pac_straglr_all_repeat_output/${ff} --loci ~/Desktop/straglr_scoring_tool_for_long_read/toolinpus_and_HPRC_bams/clp_target_hg38_3.bed \
--max_str_len 100 #optional
echo "done ${ff}"
done
after finshed, the .tsv file can be modify throug "adding_filename_and_combine_big.R" in R_script folder
########################################################################################################################################################
######################################
######################################
for j in *
do
cd ${j}
ff=${j}
for i in *.bam
do
samtools view ${i} | awk '{print ">"$1 "\t" $10}' >> ~/Desktop/fasta_of_each/${ff}_all_fasta.txt
done
cat ~/Desktop/fasta_of_each/${ff}_all_fasta.txt |sort | uniq | tr '\t' '\n' > ~/Desktop/fasta_of_each/final.${ff}_all_fasta.txt
rm ~/Desktop/fasta_of_each/${ff}_all_fasta.txt
cd ..
done
####################################################################################################
####################################################################################################
https://github.com/egonozer/in_silico_pcr
Repeat unit: 42 bp
T4_Forw_-->: ATGGGCAACCGGCGCAGCTGTGGCTATAGAAA
T4_Rev_--->: GGGGACCACGCCTCACTCCCTGCATAA
T4_Rev_with_<--- TTATGCAGGGAGTGAGGCGTGGTCCCC
Repeat unit: 35 bp
C3_Forw: CTTTGAACACACCCCCTGAG
C3_Rev: GGCAGCCTCTAGCAGAAAGT
########
perl in_silico_pcr-master/in_silico_PCR.pl -s input.fa -a ATGGGCAACCGGCGCAGCTGTGGCTATAGAAA -b TTATGCAGGGAGTGAGGCGTGGTCCCC -l 20000000 > output.txt
cat output.txt | awk 'NR>1' | awk '{total += $4} END {print total/NR/42}'