Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Carlos-Francisco Méndez-Cruz
/
lcg-bioinfoI-bionlp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Carlos-Francisco Méndez-Cruz
2019-05-14 15:41:36 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e0dd6105f40141d52e6a4c22acb7b90471a1134b
e0dd6105
1 parent
abde6659
Iris dataset for automatic clasification
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
python-fundamentals/read-sequences-v1.py
python-fundamentals/read-sequences-v1.py
0 → 100644
View file @
e0dd610
if
__name__
==
"__main__"
:
# Abrir archivo con secuencias
listLines
=
[]
length_seq
=
0
count_seq
=
0
with
open
(
"hga-sequences-1000.txt"
,
mode
=
"r"
,
encoding
=
"utf8"
)
as
iFile
:
listLines
=
iFile
.
readlines
()
for
line
in
listLines
:
if
not
line
.
startswith
(
"seqname"
):
listElements
=
line
.
split
(
"
\t
"
)
length_seq
+=
len
(
listElements
[
4
])
count_seq
+=
1
print
(
"Longitud promedio: {}"
.
format
(
length_seq
/
count_seq
))
Please
register
or
login
to post a comment