00.21-D-Apul-BS-genome ================ Sam White 2024-01-02 - 1 Background - 2 Inputs - 3 Outputs - 4 Create a Bash variables file - 5 Bisfulite conversion - 6 Inpect BS output - 7 REFERENCES # 1 Background This Rmd file will create a bisulfite-converted genome by, and for, Bismark (Krueger and Andrews 2011) using the `Apulchra-genome.fa` file. The genome FastA was taken from the [deep-dive-expression Wiki](https://github.com/urol-e5/deep-dive-expression/wiki/00-Genomic-Resources#acropora-pulchra) (GitHub Wiki), but I’m not sure of its exact origin. Due to large sizes of output files, the files cannot be sync’d to GitHub. As such, the output directories will be gzipped and available here: - (1.3GB) - - MD5: `9e1db5875f210007a43e2083f01c2db9` # 2 Inputs - Directory containing a FastA file with the file extension: .fa or .fasta (also ending in .gz). # 3 Outputs - CT Conversion - Bowtie2 index files. - CT conversion FastA - GA conversion - Bowtie2 index files. - GA conversion FastA. # 4 Create a Bash variables file This allows usage of Bash variables across R Markdown chunks. ``` bash { echo "#### Assign Variables ####" echo "" echo "# Data directories" echo 'export timeseries_dir=/home/shared/8TB_HDD_01/sam/gitrepos/urol-e5/timeseries_molecular' echo 'export output_dir_top=${timeseries_dir}/D-Apul/data' echo 'export genome_dir=${timeseries_dir}/D-Apul/data' echo "" echo "# Paths to programs" echo 'export programs_dir="/home/shared"' echo 'export bismark_dir="${programs_dir}/Bismark-0.24.0"' echo 'export bowtie2_dir="${programs_dir}/bowtie2-2.4.4-linux-x86_64"' echo "" echo "# Set number of CPUs to use" echo 'export threads=20' echo "" echo "# Print formatting" echo 'export line="--------------------------------------------------------"' echo "" } > .bashvars cat .bashvars ``` #### Assign Variables #### # Data directories export timeseries_dir=/home/shared/8TB_HDD_01/sam/gitrepos/urol-e5/timeseries_molecular export output_dir_top=${timeseries_dir}/D-Apul/data export genome_dir=${timeseries_dir}/D-Apul/data # Paths to programs export programs_dir="/home/shared" export bismark_dir="${programs_dir}/Bismark-0.24.0" export bowtie2_dir="${programs_dir}/bowtie2-2.4.4-linux-x86_64" # Set number of CPUs to use export threads=20 # Print formatting export line="--------------------------------------------------------" # 5 Bisfulite conversion ``` bash # Load bash variables into memory source .bashvars ${bismark_dir}/bismark_genome_preparation \ ${genome_dir} \ --parallel ${threads} \ --bowtie2 \ --path_to_aligner ${bowtie2_dir} ``` # 6 Inpect BS output ``` bash # Load bash variables into memory source .bashvars tree -h ${genome_dir}/Bisulfite_Genome ``` /home/shared/8TB_HDD_01/sam/gitrepos/urol-e5/timeseries_molecular/D-Apul/data/Bisulfite_Genome ├── [4.0K] CT_conversion │   ├── [169M] BS_CT.1.bt2 │   ├── [124M] BS_CT.2.bt2 │   ├── [1.5K] BS_CT.3.bt2 │   ├── [124M] BS_CT.4.bt2 │   ├── [169M] BS_CT.rev.1.bt2 │   ├── [124M] BS_CT.rev.2.bt2 │   └── [504M] genome_mfa.CT_conversion.fa └── [4.0K] GA_conversion ├── [169M] BS_GA.1.bt2 ├── [124M] BS_GA.2.bt2 ├── [1.5K] BS_GA.3.bt2 ├── [124M] BS_GA.4.bt2 ├── [169M] BS_GA.rev.1.bt2 ├── [124M] BS_GA.rev.2.bt2 └── [504M] genome_mfa.GA_conversion.fa 2 directories, 14 files # 7 REFERENCES
Krueger, Felix, and Simon R. Andrews. 2011. “Bismark: A Flexible Aligner and Methylation Caller for Bisulfite-Seq Applications.” *Bioinformatics* 27 (11): 1571–72. .