############
###Stacks###
############
#first create folder inside your RADseq working directory
mkdir raw barcodes samples stacks stackscor
#create a file containing the barcodes and put it in /barcodes directory
#barcodes
ATGTGTCGCCAA
TCTGAGCGTACA
GATCTGAAGCTC
CGACGATACTTG
CTAGATGCTGAC
GACACCGTATGT
##de novo mapping pipeline:
#####
#process_radtags
#s_T_1_sequence.txt = concatened first read files [from 3 lanes]
#s_T_2_sequence.txt = concatened second read files [from 3 lanes]
process_radtags -1 ./raw/s_T_1_sequence.txt -2 ./raw/s_T_2_sequence.txt -o ./samples/ \
-b ./barcodes -e ecoRI -c -q -r -i fastq -D -E phred64 \
--adapter_2 AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT \
--adapter_mm 2
#####
#####
#ustacks script
#!/bin/bash
files='ATGTGTCGCCAA
TCTGAGCGTACA
GATCTGAAGCTC
CGACGATACTTG
CTAGATGCTGAC
GACACCGTATGT'
#create individual catalog loci
i=1
for i in $files
do
ustacks -t fastq -f ./samples/sample_{i}.1.fq -o ./stacks -i 1 -m 3 \
-M 2 -p 15 -r -d --max_locus_stacks 5
#####
#####
#cstacks script
#!/bin/bash
files='ATGTGTCGCCAA
TCTGAGCGTACA
GATCTGAAGCTC
CGACGATACTTG
CTAGATGCTGAC
GACACCGTATGT'
samp=""
for i in $files
do
samp+="-s ./stacks/sample_{i}.1";
done
#
#Rebuild the catalog.
#
cstacks -b 1 -p 15 -n 3 $samp -o ./stacks --report_mmatches
#####
#####
#sstacks script
#!/bin/bash
files='ATGTGTCGCCAA
TCTGAGCGTACA
GATCTGAAGCTC
CGACGATACTTG
CTAGATGCTGAC
GACACCGTATGT'
#
#Match samples against catalog stacks pipeline
#
i=1
for i in $files
do
sstacks -b 1 -c ./stacks/batch_1 -s ./stacks/sample_{i}.1 -o ./stacks
let "i+=1";
done
#####
#####
#rxstacks pipeline/script
#!/bin/bash
files="sample_ATGTGTCGCCAA.1
sample_TCTGAGCGTACA.1
sample_GATCTGAAGCTC.1
sample_CGACGATACTTG.1
sample_CTAGATGCTGAC.1
sample_GACACCGTATGT.1"
#
#Make population-based corrections.
#
rxstacks -b 1 -P ./stacks/ -o ./stackscor/ \
--lnl_lim -10.0 --lnl_dist -t 8 \
--conf_lim 0.25 --prune_haplo \
--model_type snp --alpha 0.10 \
--verbose
samp=""
for file in $files
do
samp+="-s ./stackscor/$file ";
done
#
#Rebuild the catalog.
#
cstacks -b 1 -n 3 -p 15 -o ./stackscor $samp --report_mmatches
#
#Rematch the catalog.
#
for file in $files
do
sstacks -b 1 -c ./stackscor/batch_1 -s ./stackscor/$file -o ./stackscor
done
#####
#####
#populations script
populations -b 1 -P ./stackscor/ -s -t 15 -m 5 --lnl_lim -10 --vcf
#####
#####
#Aditional steps to generate whitelist containing final SNP set
#It was necessary to assembly minicontigs only associated with the final SNP set
#export based on whitelist (final snp filtering)
populations -b 1 -P ./stackscor/ -s -t 15 -W ./whitelistN3.tsv --vcf --fasta
#sort read pairs based whitelist stackscor N ind >= 3
sort_read_pairs.pl -p ./stackscor -s ./samples/ -o ./pairsWhite3N/-t fasta -d -w whitelistN3.tsv
#exec_velvet.pl
#kmer27 whitelist
exec_velvet.pl -s ./pairsWhite3N/ -o ./assembled/pairsWList/ -c -H 27 -M 200 -L -e /usr/local/bin
######
##########
###Bash###
##########
#Manual filtering using Linux shell
######
##################
###RepeatMasker###
##################
#Identify and annotate repetitive elements based on similarity
RepeatMasker -species Arthropoda
######
##########
###MiSA###
##########
#Microsatellite search
misa.pl
#misa.ini #paramenters file
definition(unit_size,min_repeats): 2-6 3-5 4-5 5-5 6-5
interruptions(max_difference_between_2_SSRs): 100
######
#########################
###Command-line blastx###
#########################
blastx -query -db nr -out