Skip to content

Commit

Permalink
Merge pull request #26 from martinghunt/ngs_2016_grep_awk_scripts
Browse files Browse the repository at this point in the history
Ngs 2016 grep awk scripts
  • Loading branch information
martinghunt authored Sep 27, 2016
2 parents 20583ba + 125e0da commit f38b605
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Notebooks/Unix/awk/awk.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"# File processing with AWK\n",
"\n",
"AWK is a programming language named after the initials of its three inventors: Alfred **A**ho, Peter **W**einberger, and Brian **K**ernighan. AWK is incredibly powerful at processing files, particularly column-bases files, which are commonplace in Bioinformatics. For example, BED, GFF, and SAM files.\n",
"AWK is a programming language named after the initials of its three inventors: Alfred **A**ho, Peter **W**einberger, and Brian **K**ernighan. AWK is incredibly powerful at processing files, particularly column-based files, which are commonplace in Bioinformatics. For example, BED, GFF, and SAM files.\n",
"\n",
"Although long programs, put into a separate file, can be written using AWK, we will use it directly on the command line. Effectively, these are very short AWK programs, often called \"one-liners\".\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion Notebooks/Unix/bash_scripts/bash_scripts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
"A basic check for this script would be to verify that two options were supplied, and if not then print a help message. The code looks like this:\n",
" \n",
" if [ $# -ne 2 ]\n",
" then\n",
" then\n",
" echo \"usage: options_example.3.sh filename number_of_lines\"\n",
" echo\n",
" echo \"Prints the filename, and the given first number of lines of the file\"\n",
Expand Down
4 changes: 2 additions & 2 deletions Notebooks/Unix/grep/grep.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
"source": [
"### Wildcards and alphabets\n",
"\n",
"Another special character in regular expressions is the dot: \".\". This stands for any character. For example, this finds all matches to chromosomes 1-9, and chromosomes X and Y:\n"
"Another special character in regular expressions is the dot: \".\". This stands for any single character. For example, this finds all matches to chromosomes 1-9, and chromosomes X and Y:\n"
]
},
{
Expand Down Expand Up @@ -304,7 +304,7 @@
"* Ranges can be given in square brackets, for example [1-5] will match 1, 2, 3, 4 or 5.\n",
"* The plus sign \"+\" has a special meaning that is similar to \"\\*\". Instead of any number of matches (including zero), it looks for at least one match. To avoid simply matching a plus sign, it must be preceded by a backslash: \"\\\\+\". For example, the regular expression 'AC\\\\+G' will match ACG, ACCG, ACCCG etc (but will not match AG).\n",
"\n",
"Warning: Adding a backslash is often called _escaping_ (e.g. _escape the plus symbol_). Depending on the software you're using (and the options you give it), you may need to escape the symbol to indicate that you want its special regex meaning (e.g. multiple copies of the last character please) or it's literal meaning (e.g. give me a '+' symbol please). If your command isn't working as you expect, try playing with these options and always test your regular expression before assuming it gave you the right answer.\n",
"Warning: Adding a backslash is often called _escaping_ (e.g. _escape the plus symbol_). Depending on the software you're using (and the options you give it), you may need to escape the symbol to indicate that you want its special regex meaning (e.g. multiple copies of the last character please) or its literal meaning (e.g. give me a '+' symbol please). If your command isn't working as you expect, try playing with these options and always test your regular expression before assuming it gave you the right answer.\n",
"\n",
"The command to find the autosomes is:"
]
Expand Down

0 comments on commit f38b605

Please sign in to comment.