Skip to content

Commit

Permalink
edit to readme.sh to reflect no CC adaptors
Browse files Browse the repository at this point in the history
  • Loading branch information
z0on committed Aug 22, 2022
1 parent 853b886 commit 9519d61
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
6 changes: 4 additions & 2 deletions 2bRAD_README.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,11 @@ java -jar $TACC_PICARD_T_DIR/picard.jar CreateSequenceDictionary R=$GENOME_FASTA
# creating a file of commands to run (assuming reads are in fastq files, one file per sample.
# (if samples were spread across several lanes, concatenate them first using
ngs_concat.pl)
2bRAD_trim_launch_dedup.pl fastq > trims
2bRAD_trim_launch_dedup_noCC.pl fastq > trims

# Note: use this command instead of the one above if you have 2bRAD libraries without degenerate tag but with 4-base in-line barcode:
# Note: use this command instead of the one above if you have 2bRAD libraries made with oligos ordered before March 2021:
2bRAD_trim_launch_dedup.pl fastq > trims
# use this command instead of the one above if you have 2bRAD libraries without degenerate tag but with 4-base in-line barcode:
2bRAD_trim_launch.pl fastq barcode2=4 > trims
# And if you have the original-style libraries without degenerate tag and without in-line barcode, use this:
2bRAD_trim_launch.pl fastq > trims
Expand Down
15 changes: 9 additions & 6 deletions automatic_RAD_pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,16 @@ nano .bashrc

# ---- PCAngsd

# activate your favorite conda environment, then
conda install -c anaconda python
conda install -c anaconda numpy
conda install -c anaconda scipy
conda install -c anaconda cython
cd
module load python2
git clone https://github.com/Rosemeis/pcangsd.git
cd pcangsd/
cd pcangsd
python setup.py build_ext --inplace

Add the paths to all newly installed programs to your $PATH (in .bashrc)
pip3 install -e .

#------------------------------------------------------------------------
#---- CHUNK 1: getting data
Expand Down Expand Up @@ -186,7 +189,7 @@ a1job=$(sbatch a1.slurm | grep "Submitted batch job" | perl -pe 's/\D//g')
FILTERS1='-minInd $MI2 -uniqueOnly 1 -remove_bads 1 -minMapQ 20 -minQ 20 -snp_pval 1e-5 -minMaf $MAF -dosnpstat 1 -doHWE 1 -maxHetFreq 0.5 -hetbias_pval 1e-3 -skipTriallelic 1'
TODO1='-doMajorMinor 1 -doMaf 1 -doCounts 1 -makeMatrix 1 -doIBS 1 -doCov 1 -doPost 1 -doGlf 2'
echo 'cat bams.nr | sort > bams.NR && mv bams.NR bams.nr && export NIND2=`cat bams.nr | wc -l`; export MI2=`echo "($NIND2*$MinIndPerc+0.5)/1" | bc`; export MAF=`echo "3/(2*$NIND2)" | bc -l`' >calc2
echo "source calc2 && angsd -b bams.nr -GL 1 $FILTERS1 $TODO1 -P 12 -out myresult2 && Rscript ~/bin/pcaStructure.R myresult2.ibsMat">a2
echo "source calc2 && angsd -b bams.nr -GL SeqTools1 $FILTERS1 $TODO1 -P 12 -out myresult2 && Rscript ~/bin/pcaStructure.R myresult2.ibsMat">a2
s2_launcher_creator.py -j a2 -n a2 -a tagmap -e [email protected] -t 2:00:00 -w 1
-q normal
a2job=$(sbatch --dependency=afterok:$a1job a2.slurm | grep "Submitted batch job" | perl -pe 's/\D//g')
Expand Down Expand Up @@ -257,7 +260,7 @@ zcat g3.mafs.gz | cut -f5 |sed 1d >freq

# relatedness with NgsRelate
echo 'export NIND2=`cat bams.nr | wc -l`; export NS=``zcat g3.mafs.gz | wc -l`' >calc3
echo 'source calc3 && zcat g3.mafs.gz | cut -f5 |sed 1d >freq && ngsRelate -g g3.glf.gz -n $NIND -f freq >g3.relatedness' >rel
echo 'source calc3 && zcat g3.mafs.gz | cut -f5 |sed 1d >freq && ngsRelate -g g3.glf.gz -n $NIND2 -f freq >g3.relatedness' >rel
s2_launcher_creator.py -j rel -n rel -a tagmap -e [email protected] -t 2:00:00 -w 1 -q normal
reljob=$(sbatch rel.slurm | grep "Submitted batch job" | perl -pe 's/\D//g')

Expand Down

0 comments on commit 9519d61

Please sign in to comment.