Skip to content

Commit

Permalink
replace chr1 with chromosome 1 for awk
Browse files Browse the repository at this point in the history
  • Loading branch information
DininduSenanayake committed Apr 15, 2024
1 parent 513a49c commit e693c21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/5_inspectmanipulate2.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ One of the powerful features is that we can combine these ranges or multiples in
approach and use .* . Consider:

- - -
```


## Aho, Weinberger, Kernighan = AWK

Expand Down Expand Up @@ -238,7 +238,7 @@ awk options 'selection_criteria {action}' input-file > output-file
!!! terminal-2 "Print lines which match the given pattern"

```bash
awk '/chr1/{print}' example.bed
awk '/chromosome1/{print}' example.bed
```
>```bash
>chromosome1 26 39
Expand Down Expand Up @@ -319,7 +319,7 @@ We can also chain patterns, by using logical operators `&&` (AND), `||` (OR), an

- First pattern, `$1 ~ /chr1` specifies the regular expression (All Regular expressions are in slashes). We are matching the first field, `$1` against the regular expression `chr1`.
- Tilde `~` means **match**.
- To do the inverse of **match**, we can use `!~` OR `!($1 ~ /chr1/)`
- To do the inverse of **match**, we can use `!~` OR `!($1 ~ /chromosome1/)`



Expand Down

0 comments on commit e693c21

Please sign in to comment.