readGff3           package:genomeIntervals           R Documentation

_M_a_k_e _a _G_e_n_o_m_e__i_n_t_e_r_v_a_l_s__s_t_r_a_n_d_e_d _o_b_j_e_c_t _f_r_o_m _a _G_F_F _f_i_l_e

_D_e_s_c_r_i_p_t_i_o_n:

     Make a 'Genome_intervals_stranded' object from a gff file in gff3
     format.

_U_s_a_g_e:

     readGff3(file, isRightOpen=TRUE)

_A_r_g_u_m_e_n_t_s:

    file: The name of the gff file to read. 

isRightOpen: Although a proper GFF3 file follows the convention of
          right-open intervals,  improper GFF files following the
          right-closed convention are frequently found. Set
          'isRightOpen = FALSE' in this case. 

_D_e_t_a_i_l_s:

     The file must follow gff3 format specifications as in <URL:
     http://www.sequenceontology.org/gff3.shtml>.  The file is read as
     a table. Meta-information (lines starting with ###) are not
     parsed. A . in, for example, the gff file's _score_ or _frame_
     field will be converted to 'NA'. When the GFF file follows the
     right-open interval convention ('isRightOpen' is 'TRUE'), then GFF
     entries for which end base equals first base are recognized as
     zero-length features and loaded as 'inter_base' intervals.

_V_a_l_u_e:

     A 'Genome_intervals_stranded' object image of the gff file.  The
     GFF3 fields 'seqid', 'source', 'type', 'score', 'strand', 'phase'
     and 'attributes' are stored in the 'annotation' slot and renamed
     as 'seq_name', 'source', 'type', 'score', 'strand', 'phase' and
     'gffAttributes' respectively.

_N_o_t_e:

     Potential FASTA entries at the end of the file are ignored.

_S_e_e _A_l_s_o:

     The functions 'getGffAttribute' and 'parseGffAttributes' for
     parsing GFF attributes.

_E_x_a_m_p_l_e_s:

     # Get file path
     libPath <- installed.packages()["genomeIntervals", "LibPath"]
     filePath <- file.path(
                           libPath,
                           "genomeIntervals",
                           "example_files"
                           )

     # Load SGD gff
     # SGD does not comply to the GFF3 right-open interval convention
     gff <- readGff3( file.path( filePath, "sgd_simple.gff"), isRightOpen = FALSE)

     head(gff,10)

     head(annotation(gff),10)

