Signed-off-by: Kai Blin <email@example.com>
If the FeatureLocation is None, instead of creating a somewhat obscure AttributeError, explicitly fail with a ValueError. This fixes issue #584 Signed-off-by: Kai Blin <firstname.lastname@example.org>
…coordinates To make sure we notice if we ever change the behaviour discussed in issue #584, explicitly test for this. Signed-off-by: Kai Blin <email@example.com>
See GitHub issue #570, complement(join(...)) as used by NCBI worked, but join(complement(...),complement(...),...) as used by EMBL/ENSEMBL did not. Mention this and recent CompoundLocation reverse complement bug fix in the NEWS file.
…,...)) See GitHub issue #570, seems this wasn't covered by a unit test. Test added to test_SeqIO_features.py using existing template approach.
This was discovered while working on GitHub issue #570.
This reveals a subtle bug in the CompoundLocation._flip(...) method wrongly reversing the order of the parts. Since they are listed in biological order, changing our frame of reference to the other strand coordindates should not change this.
…ersity of British Columbia
Previously would get e.g. AttributeError: 'str' object has no attribute 'id'
Added a new kwarg to BioSQL.Loader._load_seqfeature_basic that allows the source to be changed dynamically based on the value of the source qualifier found in the annotations of the SeqRecord Background: GFF files set aside column 2 for the source of the feature that is set to the value of the program/algorithm that generated that feature. Parsing a gff file using BCBio.GFF returns a SeqRecord object that contains the source as a qualifier key-value pair. Normally these key-value pairs are loaded into the seqfeature_qualifier_value table, but the BioSQL wiki suggests that the source should instead go into the term table. The current code in biopython sets the value of source for a seqfeature to be the same value regardless of whether the SeqRecord object contains the source qualifier. This change adds in code that will search for a source qualifier in the SeqRecord, set the value to the source of the seqfeature and remove the key from the SeqRecord qualifiers dict so that it is not mistakenly added to the seqfeature_qualifier_value table
Should resolve GitHub issue #561.