<p>Hi,</p>

<p>Will always R2 file contain sense transcript and R1 reverse complement of transcript?</p>

<p>If R2 file contains sense transcript, I will have to run HTSeq.scripts.count with &quot;reverse&quot; setting to quantify sense transcription. Quite confusing, isn&#39;t it?</p>

<p>Library creation kit -&gt; E7420S NEBNext&reg; Ultra&trade; Directional RNA Library Prep Kit for Illumina&reg;</p>

<p>Thanks, Bernardo</p>

<p>P.S. Here is the pipeline:</p>

<p>set -ue<br />
#################################################<br />
#BWA test aligner with paired-end data<br />
#################################################</p>

<p># Get the genome file from the command line<br />
genome_file=$1<br />
# Get the fastq file from the command line<br />
fastq_file_R1=$2<br />
# Get the fastq file from the command line<br />
fastq_file_R2=$3<br />
# Get the fastq file from the command line<br />
fastq_file_R3=$4<br />
# Get the fastq file from the command line<br />
fastq_file_R4=$5<br />
#get gff<br />
GFF=$6</p>

<p>#BWA default settings<br />
bwa index $genome_file<br />
#BWA input<br />
bwa mem -t 8 $genome_file $fastq_file_R1 $fastq_file_R2 | gzip -3 &gt; P_S1_L001_aln-pe.sam.gz<br />
bwa mem -t 8 $genome_file $fastq_file_R3 $fastq_file_R4 | gzip -3 &gt; V_S1_L001_aln-pe.sam.gz</p>

<p>################################################################<br />
#Flagstat<br />
################################################################<br />
#Convert .sam to .bam to input to Flagstat<br />
samtools view -b -S -o P_S1_L001_aln-pe.bam P_S1_L001_aln-pe.sam.gz<br />
samtools flagstat P_S1_L001_aln-pe.bam</p>

<p>samtools view -b -S -o V_S1_L001_aln-pe.bam V_S1_L001_aln-pe.sam.gz<br />
samtools flagstat V_S1_L001_aln-pe.bam</p>

<p>################################################################<br />
#Count reads mapped with htseq-count<br />
################################################################</p>

<p>samtools sort -n V_S1_L001_aln-pe.bam invivo.sorted<br />
python -m HTSeq.scripts.count -m intersection-nonempty -f bam -a 10 -t mRNA -i Parent -r name -s reverse invivo.sorted.bam $GFF | awk &#39;n&gt;=5 { print a[n%5] } { a[n++%5]=$0 }&#39; &gt; invivo_R.counts</p>

<p>samtools sort -n P_S1_L001_aln-pe.bam plate.sorted<br />
python -m HTSeq.scripts.count -m intersection-nonempty -f bam -a 10 -t mRNA -i Parent -r name -s reverse plate.sorted.bam $GFF | awk &#39;n&gt;=5 { print a[n%5] } { a[n++%5]=$0 }&#39; &gt; plate_R.counts</p>

<p><br />
################################################################<br />
#IGV<br />
################################################################<br />
#samtools sort -n sorts by name, not coordinate.. index requires sort by coordinate..<br />
samtools sort V_S1_L001_aln-pe.bam V_S1_L001_aln-pe.bam.sorted<br />
samtools index V_S1_L001_aln-pe.bam.sorted.bam</p>

<p>samtools sort P_S1_L001_aln-pe.bam P_S1_L001_aln-pe.bam.sorted<br />
samtools index P_S1_L001_aln-pe.bam.sorted.bam</p>

I believe the "how" is answered on this website (1st Figure under product information tab):

https://www.neb.com/products/e7420-nebnext-ultra-directional-rna-library-prep-kit-for-illumina

Seems like it is a dUTP protocol, which would mean you should be using "--library-type fr-firststrand" in TopHat:

http://ccb.jhu.edu/software/tophat/manual.shtml#toph

http://ccb.jhu.edu/software/tophat/faq.shtml#library_type