## partition the genes
~/GITHUB/trinityrnaseq/util/misc/genome_gff3_to_gene_gff3_partitions.pl  genes.gff3 genes.fa 500
find gene_contigs/ -regex ".*gene.fa" | tee fa_files.list

## simulate reads:
sim_reads.pl fa_files.list  | tee sim.cmds


# Trinity
~/GITHUB/trinityrnaseq/util/misc/iso_reco_analysis/run_trinity_no_LR.pl fa_files.list  | tee trin.noFL.cmds

~/GITHUB/trinityrnaseq/util/misc/iso_reco_analysis/run_trinity_WITH_LR.pl ./fa_files.list  | tee trin.withFL.cmds

# gmap the Trinity reconstructed transcripts to the gene sequence
find gene_contigs/ -regex ".*Trinity.fasta" > trin_fa.list
~/GITHUB/trinityrnaseq/util/misc/iso_reco_analysis/gmap_to_ref.pl trin_fa.list  > gmap.cmds

# cufflinks reconstruct
find gene_contigs/ -regex ".*genome.sam.coordSorted.bam" | tee bams.list
~/GITHUB/trinityrnaseq/util/misc/iso_reco_analysis/bam_to_cuff.pl  bams.list  | tee cuff.cmds

# convert gff3 files to bed
find gene_contigs/ -regex ".*gene.gff3" | tee gene.gff3.list
~/GITHUB/trinityrnaseq/util/misc/iso_reco_analysis/gene_gff3_to_bed_cmds.pl  gene.gff3.list  > gene.gff3.list.cmds

# convert cuff gtf to bed:
~/GITHUB/trinityrnaseq/util/misc/iso_reco_analysis/cuff_gtf_to_bed.pl  cuff.list  |tee cuff.list.cmds



########################################
# pull together all results for viewing.

find bin_0/ -regex '.*gene.gff3.bed' -exec cat {} \; | sort -k1,1 -k2,2n > all_genes.gff3.bed

find bin_0 -regex ".*trinity_WITH_LR_outdir.Trinity.fasta.gff3.bed" -exec cat {} \; | sort -k1,1 -k2,2n > trin.WITH_LR.bed

find bin_0 -regex ".*trinity_no_LR_outdir.Trinity.fasta.gff3.bed" -exec cat {} \; | sort -k1,1 -k2,2n > trin.no_LR.bed

find bin_0 -regex ".*transcripts.gtf.bed" -exec cat {} \; | sort -k1,1 -k2,2n > cuff_trans.bed

