Build BSgenome by youself
Build a BSgenome by youself
Reference: Tom Guest
In this tutorial, I’ll show how to create a BSgenome library with Linux commands. The main steps for doing this are to prepare the fasta files and the configure files.
Preparing the sequence files and configuring file
We’d like to store each chromosome into an independent file and record them in a configuring file so the BSgenome can find them. Here I use awk
to remove useless information in the name and seqkit
to extract seqs.
Prepare: Genome.fa
and seqkit
conda install -c bioconda seqkit
|
R
|
If everything is right, you would see the codes below and a directory BSgenome.dme.BDGP6.32
was created. Now, we need to package it and install it.
Creating package in ./BSgenome.dme.BDGP6.32 Loading '2L' sequence from FASTA file '/media/ken/BackUP/Drosophila/BSgenome/2L.fa' ... DONE Loading '2R' sequence from FASTA file '/media/ken/BackUP/Drosophila/BSgenome/2R.fa' ... DONE Loading '3L' sequence from FASTA file '/media/ken/BackUP/Drosophila/BSgenome/3L.fa' ... DONE Loading '3R' sequence from FASTA file '/media/ken/BackUP/Drosophila/BSgenome/3R.fa' ... DONE Loading '4' sequence from FASTA file '/media/ken/BackUP/Drosophila/BSgenome/4.fa' ... DONE Loading 'EGFP' sequence from FASTA file '/media/ken/BackUP/Drosophila/BSgenome/EGFP.fa' ... DONE Loading 'GAL4' sequence from FASTA file '/media/ken/BackUP/Drosophila/BSgenome/GAL4.fa' ... DONE Loading 'mCD8GFP' sequence from FASTA file '/media/ken/BackUP/Drosophila/BSgenome/mCD8GFP.fa' ... DONE Loading 'mitochondrion_genome' sequence from FASTA file '/media/ken/BackUP/Drosophila/BSgenome/mitochondrion_genome.fa' ... DONE Loading 'test' sequence from FASTA file '/media/ken/BackUP/Drosophila/BSgenome/test.fa' ... DONE Loading 'X' sequence from FASTA file '/media/ken/BackUP/Drosophila/BSgenome/X.fa' ... DONE Loading 'Y' sequence from FASTA file '/media/ken/BackUP/Drosophila/BSgenome/Y.fa' ... DONE Writing all sequences to './BSgenome.dme.BDGP6.32/inst/extdata/single_sequences.2bit' ... DONE
|
Now, you can load your Genome
Build BSgenome by youself