public class CreateAnchorFilesFromGeneGFF
extends Object
Based on WGS_whatever.CreateAnchorsFromGeneGff.java
This method creates two fasta files of anchor coordinates:
The first has exact gene coordinates to be used when blasting
B73 reference genes against a particular assembly, e.g. Sorghum.
The second has genes with 1000bp flanking added.
Method:
Takes a gff file sorted to contain only gene data
If any gene is embedded within another, it is tossed.
If any gene start position overlaps the previous gene end position,
merge the gene.
After mergin genes, add 1000bp flanking on either end. If there is less
than 2000 bps between genes, spli the difference
Can take 1 file or a directory of files. The file names are assume to look
like this:
gffv4Rel34_chr5_gene.txt
This matters to the parsing of the chromosome name (ie "5" above)
OUTPUT Notes:
1. Two csv files of chr,start,end are created for each chromosome. The first
has just merged/tossed gene coordinates, the second has these genes with 1000bp flanking added.
2. A fasta file for each chromosome is created: contains all the anchors
for that chromosome. This was created when the thought was that Zack needed
it for comparison. THis way he didn't have to go through a db.
3. The fasta files are not used in LoadAnchorsToPHGdb.java. It uses the csv file
created which contains that chr,start,end. They ARE used when blasting genes
against the assemblies.
4. AFter all the chromosomes have been processed, concat them into 1 file
for use with LoadANchorsToPHGdb.java via this command line:
cat anchorsFile_chr1_MergedPlus1000orGapDiffcoordinates.csv anchorsFile_chr2_MergedPlus1000orGapDiffcoordinates.csv ... > anchorsFile_all10_MergedPlus1000orGapDiffcoordinates.csv
- Then edit out the header lines except for the first one.
- Author:
- lcj34