Skip to content

truncated scaffolds from gff files #70

@simarilion

Description

@simarilion

I'm sure I'm missing something obvious here.....

I'd like to view a long (583,249 bp long) but feature-poor scaffold (7 features). These features are described in the attached gff file which specifies the full length of the scaffold on the second line as:

##sequence-region scaffold59 1 583249

I can generate output files OK, but they don't display the entire length of the scaffold - they always stop at the end of the last feature (position 483,172), i.e. missing about 100,000 bp of straight black line (example output also attached).

Here's an example of one of my attempts to use dan_feature_viewer to get this working:


from dna_features_viewer import BiopythonTranslator
from BCBio import GFF
in_file = "scaffold59_original.gff"

in_handle = open(in_file)
gff_records = []
for rec in GFF.parse(in_handle):
#print(rec)
gff_records.append(rec)
in_handle.close()

#fig, ax = plt.subplots()

start = 0
end = 583249
record = BiopythonTranslator().translate_record(gff_records[0][start:end])
ax, _ = record.plot(figure_width=10, strand_in_label_threshold=7)
ax.figure.savefig("dna_FV_scaffold59_original_test2.png", bbox_inches="tight")


scaffold59_original_gff.txt

dna_FV_scaffold59.pdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions