Skip to content

Commit

Permalink
recipe for dropping non-autosomes
Browse files Browse the repository at this point in the history
  • Loading branch information
gfudenberg committed Apr 5, 2022
1 parent e63c45a commit d78c5c6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/guide-recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ Use closest after filtering by strand, and passing the `ignore_upsream=True` arg
bioframe.closest(df1.loc[df1['strand']=='+'], df2, ignore_upstream=True)
```

## Drop non-autosomes from a bedframe?
Use pandas DataFrame.isin(values):
```
df[ ~df.chrom.isin(['chrX','chrY'])]
```



Expand Down

0 comments on commit d78c5c6

Please sign in to comment.