% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pred2fasta.R
\name{pred2fasta}
\alias{pred2fasta}
\title{Save the sequence of the predicted LTR Transposons in a fasta file}
\usage{
pred2fasta(LTRpred.tbl, prediction.file, output = "output.fa")
}
\arguments{
\item{LTRpred.tbl}{the \code{\link{data.frame}} generated by \code{\link{LTRpred}}.}

\item{prediction.file}{the fasta file storing either the full LTR Transposon sequence or only the LTR sequence
as returned by the \code{\link{LTRpred}} function.}

\item{output}{the fasta file to which the output sequences shall be stored in.}
}
\description{
This function allows users to save the sequence of the predicted LTR Transposons or LTRs in a fasta file.
}
\details{
The output \code{data.frame}s returned by \code{\link{LTRpred}} contain all information of the predicted
LTR retrotransposons that can be used for post-filtering steps. After these post-filtering steps
sequences of the remaining (filtered) candidates can be retrieved by this function.
}
\examples{
\dontrun{
# Hypothetical Example
# Generate LTR transposon prediction for A. thaliana 
Ath.Pred <- LTRpred(input.gff3        = "TAIR10_chr_all/TAIR10_chr_all_Prediction.gff", 
                    genome.file       = "Genome/TAIR10_chr_all.fas",
                    trnas             = "araTha1-tRNAs.fa",
                    hmms              = "hmm_*",
                    cores             = 1)

# Filter for LTR transposons having 100 pec. sequence similarity between their LTRs
FilteredLTRTransposons <- dplyr::filter(Ath.Pred, ltr_similarity == 100)

# Write the sequences of these filtered LTR transposons to a fasta file
pred2fasta(LTRpred.tbl = FilteredLTRTransposons, 
           prediction.file = "TAIR10_chr_all-ltrdigest_complete.fas", 
           output                = "AthalianaPutativeLTRTransposons.fa")
}
}
\seealso{
\code{\link{LTRharvest}}, \code{\link{LTRdigest}}, \code{\link{LTRpred}}, \code{\link{read.prediction}}
}
\author{
Hajk-Georg Drost
}
