Skip to content
This repository was archived by the owner on May 2, 2019. It is now read-only.

Add files via upload#8

Open
DariaGorbach wants to merge 1 commit intoAleksandrSl:masterfrom
DariaGorbach:master
Open

Add files via upload#8
DariaGorbach wants to merge 1 commit intoAleksandrSl:masterfrom
DariaGorbach:master

Conversation

@DariaGorbach
Copy link
Collaborator

No description provided.

def bed_parser(bfile):
output_data = []
with open(bfile) as bed_data:
for line in bed_data.input():
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Input can be omitted

output_data = []
with open(bfile) as bed_data:
for line in bed_data.input():
try:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation

try:
line = bed_data.stdin.readline()
if not line:
break
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't really understand what this code do )
To read file usually you do:

with open(file) as in_f:
    for line in in_f:
        do_what_you_want_with_line(line)

Copy link
Collaborator Author

@DariaGorbach DariaGorbach Oct 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's supposed to be a verification, whether file contains lines or not

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants