8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
to_bed
Have a question about t 8000 his 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
I'm having trouble with PyRanges reordering columns in my bed file when I try to write it. Here's a minimal example:
import pandas as pd import pyranges as pr chrs = [1,1,1] starts = [1,1,1] ends = [2,3,4] st = ['+', '+', '+'] other1 = [1,1,1] other2 = [2,2,2] df = pd.DataFrame() df['Chromosome'] = chrs df['Start'] = starts df['End'] = ends df['Strand'] = st df['other1'] = other1 df['other2'] = other2 df = pr.PyRanges(df) df.head() df.to_bed('test_example.bed')
Output from df.head():
df.head()
Heading test_example.bed:
test_example.bed
As you can see, the columns have been swapped. Any idea if this behavior can be rectified?
The text was updated successfully, but these errors were encountered:
Update: This also fails when you add canonical bed columns:
import pandas as pd import pyranges as pr chrs = [1,1,1] starts = [1,1,1] ends = [2,3,4] st = ['+', '+', '+'] other1 = [1,1,1] other2 = [2,2,2] df = pd.DataFrame() df['Chromosome'] = chrs df['Start'] = starts df['End'] = ends df['Strand'] = st df['ThickStart'] = other1 df['ThickEnd'] = other2 df = pr.PyRanges(df) df.to_bed('test_example.bed')
vs.
Sorry, something went wrong.
No branches or pull requests
I'm having trouble with PyRanges reordering columns in my bed file when I try to write it. Here's a minimal example:
Output from
df.head()
:Heading

test_example.bed
:As you can see, the columns have been swapped. Any idea if this behavior can be rectified?
The text was updated successfully, but these errors were encountered: