Skip to content

Commit

Permalink
Use deepcopy
Browse files Browse the repository at this point in the history
Avoid duplicating annotations.
  • Loading branch information
veghp committed Jun 17, 2024
1 parent 149794a commit d7b2245
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions epijinn/Bedmethyl.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#
# You should have received a copy of the GNU General Public License along with Ediacara. If not, see <https://www.gnu.org/licenses/>.

import copy
import os

import pandas
Expand Down Expand Up @@ -200,8 +201,8 @@ def subset_bed_to_pattern_match(self, methylase, bed=None):
bed = self.bed
methylated_index = methylase.index_pos
mod_base = methylase.sequence[methylated_index].upper()

annotated_record = annotate_methylation(self.record)
record_copy = copy.deepcopy(self.record)
annotated_record = annotate_methylation(record_copy)

# CREATE LIST OF POSITIONS
positive_strand_locations = []
Expand Down

0 comments on commit d7b2245

Please sign in to comment.