# RNA-seq (Major Steps)
## Align the reads to genome
hisat2 -p 20 --max-intronlen 20000 -k 5 --summary-file summary_SampleName_vsCxJ --new-summary --rg-id SampleName -x ~/data/merged_BrapaChiifu_Bol_JZS/ -1 Input.RNA.R1.fastq.gz -2 Input.RNA.R2.fastq.gz|samtools view -Sb - >align_SampleName_vsCxJ.bam
## Gene exp quantification with the cross-mapping reads considered (Multiple steps included in a single script)
perl ~/scripts/flowProccessAlignedReadsByAssign.pl align_SampleName_vsCxJ


# Methylation (Major Steps)
## Run bismark to align the data onto genome
bismark ~/data/merged_BrapaChiifu_Bol_JZS/ -1 Input.methy.R1.fastq.gz -2 Input.methy.R2.fastq.gz -p 20 -B SampleNamevsCxJ -o ./output_dir --bowtie2 --score-min L,0,-0.2 --no-discordant --maxins 500 --dovetail --no-mixed --ignore-quals 1>zzz.runAlign_SampleNamevsCxJ.log 2>&1
## Deduplicate the BAM files
deduplicate_bismark -p -o SampleNamevsCxJ_pe SampleNamevsCxJ_pe.bam
## Extract the methylation info
bismark_methylation_extractor --bedGraph --comprehensive -o ./output_dir --gzip --parallel 10 --cytosine_report --buffer_size 10G --genome_folder ~/data/merged_BrapaChiifu_Bol_JZS/ ../methylation_align/SampleNamevsCxJ_pe.bam 1>zzz.run_extract_SampleName.log 2>&1
## Process the bimask methylation results
perl ~/scripts/summarizeMethyCountFromContextTxt.pl _context_SampleNamevsCxJ.deduplicated.txt.gz
perl ~/scripts/mergeMethyFromBothStrands_CpG.pl ~/data/merged_Chiifu_JZS.fa CpG_context_SampeNamevsCxJ_pe.deduplicated.txt.result >CpG_context_SampeNamevsCxJ_pe.deduplicated.txt.result.m.txt
perl ~/scripts/mergeMethyFromBothStrands_CHG.pl ~/data/merged_Chiifu_JZS.fa CHG_context_SampeNamevsCxJ_pe.deduplicated.txt.result >CHG_context_SampeNamevsCxJ_pe.deduplicated.txt.result.m.txt
