Skip to content

Commit

Permalink
fix issue #37 with the index error
Browse files Browse the repository at this point in the history
  • Loading branch information
gbouras13 committed Oct 25, 2023
1 parent 69db76a commit 14e32d7
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/plassembler/utils/plass_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,7 @@ def identify_chromosome_process_flye(self, chromosome_len):
else:
dna_header = "plasmid_" + str(i)
dna_description = ""
# get length for bed file
le = info_df.length.loc[
info_df["seq_name"] == dna_record.id
]
plas_len = int(le.iloc[0])

# write the updated record
dna_record = SeqRecord(
dna_record.seq,
Expand All @@ -287,7 +283,7 @@ def identify_chromosome_process_flye(self, chromosome_len):
# get length for bed file
# make bed file
bed_file.write(
f"{dna_header}\t1\t{plas_len}\n"
f"{dna_header}\t1\t{contig_len}\n"
) # Write read name
i += 1

Expand Down Expand Up @@ -367,11 +363,6 @@ def identify_chromosome_process_flye_long(self, chromosome_len):
else:
dna_header = "plasmid_" + str(i)
dna_description = ""
# get length for bed file
le = info_df.length.loc[
info_df["seq_name"] == dna_record.id
]
plas_len = int(le.iloc[0])
# write the updated record
dna_record = SeqRecord(
dna_record.seq,
Expand All @@ -382,7 +373,7 @@ def identify_chromosome_process_flye_long(self, chromosome_len):
# get length for bed file
# make bed file
bed_file.write(
f"{dna_header}\t1\t{plas_len}\n"
f"{dna_header}\t1\t{contig_len}\n"
) # Write read name
i += 1
# add to object
Expand Down

0 comments on commit 14e32d7

Please sign in to comment.