Home
Name Modified Size InfoDownloads / Week
o2n-sam2sites 2017-02-09 204.5 kB
seq_tool_fq_rc.pl 2017-02-09 2.2 kB
seq_clipper.tgz 2017-02-09 10.4 kB
pairaln-1.0.rar 2017-02-09 61.5 kB
o2n-seq README.txt 2017-02-09 2.1 kB
fq-line-merge.pl 2017-02-09 685 Bytes
o2n-merge-base-5.pl 2017-02-09 1.6 kB
adaptor.pl 2017-02-09 833 Bytes
Totals: 8 Items   283.8 kB 0
Before use, please 
1) Install bwa, samtools, Trimmomatic
2) Make file of seq_clipper and pairaln


1. Remove the first five bases and intermediate adaptor from the read pairs (read 1 and read 2). 
perl -e '{while($line1=<>){$line2=<>;@a=split(//,$line2);$line3=<>;$line4=<>;@b=split(//,$line4);print $line1;print join("",@a[5..$#a]);print $line3;print join("",@b[5..$#b]);}}' FILE_1_clean.fq | seq_clipper -f FQ -a AGATCAGTCGTTCACCGACT -a AGATCAGTCGTACGTGCTTA > FILE.R1.fq
perl -e '{while($line1=<>){$line2=<>;@a=split(//,$line2);$line3=<>;$line4=<>;@b=split(//,$line4);print $line1;print join("",@a[5..$#a]);print $line3;print join("",@b[5..$#b]);}}' FILE_2_clean.fq | seq_clipper -f FQ -a AGATCAGTCGTTCACCGACT -a AGATCAGTCGTACGTGCTTA > FILE.R2.fq
perl seq_tool_fq_rc.pl FILE.R2.fq
perl adaptor.pl FILE.R1.fq RC_FILE.R2.fq

2. Filter out low-quality read pairs.
java -jar trimmomatic-0.33.jar PE -threads 4 -phred33 -trimlog adp-FILE-trim.log adp-FILE.R1.fq adp-RC_FILE.R2.fq adp-FILE.R1-p.fq adp-FILE.R1-u.fq adp-RC_FILE.R2-p.fq adp-RC_FILE.R2-u.fq TRAILING:20 SLIDINGWINDOW:4:20 MINLEN:36 AVGQUAL:20

3. Determine the consensus sequence from read 1 and read 2 by aligning them to each other.
perl fq-line-merge.pl adp-FILE.R1-p.fq adp-RC_FILE.R2-p.fq adp-FILE-trim.m.fq
pairaln -M 1 -X -3 -O -150 -E -150 -T 0 -a adp-FILE-trim.m.fq > adp-FILE-trim.m.aln.fq

4. Assign quality scores for the consensus sequence according to the bases of read 1 and read 2.
perl o2n-merge-base-5.pl adp-FILE-trim.m.aln.fq > adp-FILE-trim.o2n

5. Map the consensus sequence with modified quality to the reference genome and perform variance calling.
bwa aln -t 4 $DB adp-FILE-trim.o2n > adp-FILE-trim.aln
bwa samse $DB adp-FILE-trim.aln adp-FILE-trim.o2n > adp-FILE-trim.sam
samtools view -bt $DB.fai adp-FILE-trim.sam > adp-FILE-trim.bam
samtools sort adp-FILE-trim.bam adp-FILE-trim.srt
samtools index adp-FILE-trim.srt.bam
samtools view adp-FILE-trim.srt.bam | o2n-sam2sites > adp-FILE-trim.pileup


NOTE: This pairaln modified from smartdenove assembler developed by Jue Ruan.
Source: o2n-seq README.txt, updated 2017-02-09