pbasting / RATT-with-GFF

RATT-with-GFF enables Rapid Annotation Transfer Tool (RATT) to be used with a GFF as your annotation file. RATT is a great tool for transferring annotations from one genome to another, but requires the annotations be in EMBL format. This pipeline is designed to use existing file conversion tools in order to run RATT with GFF annotations files
7 stars 5 forks source link

IOError: [Errno 2] No such file or directory #2

Open jolespin opened 4 years ago

jolespin commented 4 years ago

Here's my command:

(ratt_env) -bash-4.1$ RATT-with-GFF/RATTwithGFF.py Gene_Models/spp.gff3 Gene_Models/spp.scaffolds.fa Assemblies/Sch523_scaffolds.fasta refToQuery Strain

<RATTwithGFF.py> checking for valid input files...

<RATTwithGFF.py> input files are valid
Traceback (most recent call last):
  File "RATT-with-GFF/RATTwithGFF.py", line 672, in <module>
    main()
  File "RATT-with-GFF/RATTwithGFF.py", line 35, in main
    gffFileName = fixLineEndings(gffFileName)
  File "RATT-with-GFF/RATTwithGFF.py", line 108, in fixLineEndings
    with open(newFileName,"wb") as outFile:
IOError: [Errno 2] No such file or directory: 'temp_Gene_Models/spp.gff3'

Here's the version:

#!/usr/bin/env python2.7

##############################################################################################################
# RATTwithGFF.py                                                                                             #
# Author: Preston Basting                                                                                    #
# Last Changed 06/21/18                                                                                      #
# Contact: pjb68507@uga.edu                                                                                  #
# Function: This program is designed to run the rapid annotation transfer tool (RATT) using gff as input.    #
#   RATT is a tool for transferrin annotations from one genome to another. Normally, RATT requires embl as   #
#   the annotation format. This program uses other scripts to handle the file conversions and corrects for   #
#   the errors that often occur. Produces  gff files as output.                                              #
##############################################################################################################
jolespin commented 4 years ago

Figured it out. The way you coded this means that these files need to be in the same current working directory.

jolespin commented 4 years ago

Here is the error now:

<RATTwithGFF.py> converting contig01_circ.gff to contig01_circ.embl....
usage: EMBLmyGFF3 [-h] [-a] [-c CREATED]
                  [-d {CON,PAT,EST,GSS,HTC,HTG,MGA,WGS,TSA,STS,STD}]
                  [-g ORGANELLE] [-i LOCUS_TAG] [-k KEYWORD [KEYWORD ...]]
                  [-l CLASSIFICATION]
                  [-m {genomic DNA,genomic RNA,mRNA,tRNA,rRNA,other RNA,other DNA,transcribed RNA,viral cRNA,unassigned DNA,unassigned RNA}]
                  [-o OUTPUT] [-p PROJECT_ID] [-q]
                  [-r {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25}]
                  [-s SPECIES] [-t {linear,circular}] [-v]
                  [-x {PHG,ENV,FUN,HUM,INV,MAM,VRT,MUS,PLN,PRO,ROD,SYN,TGN,UNC,VRL}]
                  [-z] [--ah {One of the parameters above}] [--de DE]
                  [--ra RA [RA ...]] [--rc RC] [--rg RG] [--rl RL] [--rt RT]
                  [--rx RX] [--email EMAIL] [--expose_translations]
                  [--force_unknown_features] [--force_uncomplete_features]
                  [--interleave_genes] [--keep_duplicates]
                  [--locus_numbering_start LOCUS_NUMBERING_START]
                  [--no_progress] [--no_wrap_qualifier] [--shame]
                  [--translate]
                  [--use_attribute_value_as_locus_tag USE_ATTRIBUTE_VALUE_AS_LOCUS_TAG]
                  [--uncompressed_log] [--version VERSION] [--strain STRAIN]
                  [--environmental_sample]
                  [--isolation_source ISOLATION_SOURCE] [--isolate ISOLATE]
                  gff_file fasta
EMBLmyGFF3: error: unrecognized arguments: contig_fasta/contig01_circ.fa

fixing line-breaks for: contig01_circ.embl....
Traceback (most recent call last):
  File "RATT-with-GFF/RATTwithGFF.py", line 673, in <module>
    main()
  File "RATT-with-GFF/RATTwithGFF.py", line 48, in main
    gffsToEmbls(contigs)
  File "RATT-with-GFF/RATTwithGFF.py", line 201, in gffsToEmbls
    cleanEmbl(contig)
  File "RATT-with-GFF/RATTwithGFF.py", line 257, in cleanEmbl
    cleanEmblLines = fixBrokenLines(embl)
  File "RATT-with-GFF/RATTwithGFF.py", line 241, in fixBrokenLines
    with open(fileName) as file:
IOError: [Errno 2] No such file or directory: 'contig_embl/contig01_circ_tmp1.embl'
luciaalvarez95 commented 4 years ago

Hi! I have exactly the same problem, did you find a solution?

Many thanks

jolespin commented 4 years ago

Is this supposed to convert genbank to gff? I think I ended up just using BioPython to parse the records and then format it for gff.

luciaalvarez95 commented 4 years ago

Thanks for you reply! This pipeline should convert gff to embl, so then you can use that embl as an input for RATT. I have been struggling for a while to run that program correctly because I am not able to get a correct conversion from gff to embl and this doesn't seem to work either.

jolespin commented 4 years ago

Author hasn't touched this repository in 2 years so it might be good to look into another tool. I was looking into annotation transfer in the past and its a messy business.