Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build dictionary from bed file #86

Closed
Tracked by #64
ns-rse opened this issue Nov 29, 2024 · 0 comments · Fixed by #97
Closed
Tracked by #64

Build dictionary from bed file #86

ns-rse opened this issue Nov 29, 2024 · 0 comments · Fixed by #97
Labels

Comments

@ns-rse
Copy link
Contributor

ns-rse commented Nov 29, 2024

Currently we have...

    utron_coords = defaultdict(list)
    z = 0

    with iotools.open_file(argv_as_dictionary["utron_bed"]) as bedfile:
        # with iotools.open_file(bed_path) as bedfile:
        for line in bedfile:
            if z < 5:
                print(line)
                z += 1
            contents = line.strip().split("\t")
            chromosome, start, end, transcript_id, bedstrand = (
                contents[0],
                int(contents[1]),
                int(contents[2]),
                contents[3].strip("_intron"),
                contents[5],
            )
            bed_tuple = (chromosome, start, end, transcript_id, bedstrand)
            utron_coords[transcript_id].append(bed_tuple)
            # utron_coords.append(bed_tuple)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant