#1.输入数据
# genome:
# genome.fasta
#
# rnaseq data:
# name.rna.1.fastq.gz
# name.rna.2.fastq.gz
#
# homolog.fasta
#2.bam文件准备
hisat2-build -p 20 genome.fasta name
hisat2 -p 24 -x name-1 name.rna.1.fastq.gz -2 name.rna.2.fastq.gz -S name.rna.sam
samtools sort --threads 24 -m 4G -o name.rna.sort.bam name.rna.sam
samtools index name.rna.sort.bam
#3.braker.pl,得到augustus.hints.gtf
braker.pl --species=name --genome=genome.fasta --bam=name.rna.sort.bam --prot_seq=homolog.fasta --cores 24 --prg=gth --gth2traingenes --etpmode --softmasking
#4.格式处理
perl -e 'while (<>) { if (m/\tCDS\t/) { print; s/\tCDS\t/\texon\t/; print; } elsif (m/\ttranscript\t/) { next; } elsif (m/^#/) { next; } elsif (m/\tgene\t/) { next; } elsif (m/\tintron\t/) { next; } else { print; } }' braker/name/augustus.hints.gtf > braker.gtf
/opt/biosoft/PASApipeline-v2.3.3/misc_utilities/gtf_to_gff3_format.pl braker.gtf genome.fasta > braker.gff3
gff3_clear.pl --prefix braker braker.gff3 > aa; mv aa braker.gff3
GFF3Clear --gene_prefix braker --genome genome.fasta braker.gff3 > braker.geneModels.gff3
gff3ToGtf.pl genome.fasta braker.geneModels.gff3 > braker.geneModels.gtf
eukaryotic_gene_model_statistics.pl braker.geneModels.gtf genome.fasta braker > braker.statistics