-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathawk-bi-ji.html
executable file
·201 lines (160 loc) · 7.64 KB
/
awk-bi-ji.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<!DOCTYPE html>
<html lang="chinese">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>awk 笔记</title>
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="referrer" content="origin" />
<meta name="generator" content="Pelican" />
<link href="/" rel="canonical" />
<!-- Feed -->
<link href="/theme/css/style.css" type="text/css" rel="stylesheet" />
<!-- Code highlight color scheme -->
<link href="/theme/css/code_blocks/github.css" rel="stylesheet">
<!-- Custom fonts -->
<link href='https://fonts.googleapis.com/css?family=Montserrat:400,300' rel='stylesheet' type='text/css' />
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet" type="text/css" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<link href="/awk-bi-ji.html" rel="canonical" />
<meta name="description" content="去掉fastq文件中的UMI(前21bp),再将文件输出到标准输出 if else 嵌套判断 match() 函数 substr() 函数 cat $fq | awk '{ if (match($0,/^@/)) { print $0 } else if (...">
<meta name="author" content="yw">
<!-- Open Graph -->
<meta property="og:site_name" content="M's site"/>
<meta property="og:title" content="awk 笔记"/>
<meta property="og:description" content="去掉fastq文件中的UMI(前21bp),再将文件输出到标准输出 if else 嵌套判断 match() 函数 substr() 函数 cat $fq | awk '{ if (match($0,/^@/)) { print $0 } else if (..."/>
<meta property="og:locale" content="en_US"/>
<meta property="og:url" content="/awk-bi-ji.html"/>
<meta property="og:type" content="article"/>
<meta property="article:published_time" content="2018-11-29 14:18:00+08:00"/>
<meta property="article:modified_time" content=""/>
<meta property="article:author" content="/author/yw.html">
<meta property="article:section" content="notes"/>
<meta property="og:image" content="/theme/images/post-bg.jpg">
<!-- Twitter Card -->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Article",
"name": "awk 笔记",
"headline": "awk 笔记",
"datePublished": "2018-11-29 14:18:00+08:00",
"dateModified": "",
"author": {
"@type": "Person",
"name": "yw",
"url": "/author/yw.html"
},
"image": "/theme/images/post-bg.jpg",
"url": "/awk-bi-ji.html",
"description": "去掉fastq文件中的UMI(前21bp),再将文件输出到标准输出 if else 嵌套判断 match() 函数 substr() 函数 cat $fq | awk '{ if (match($0,/^@/)) { print $0 } else if (..."
}
</script>
</head>
<!-- TODO : Body class -->
<body class="home-template">
<nav id="menu">
<a class="close-button">Close</a>
<div class="nav-wrapper">
<p class="nav-label">Menu</p>
<ul>
</ul>
</div>
</nav>
<!-- Progressbar -->
<div class="progress-container">
<span class="progress-bar"></span>
</div>
<!-- Page Header -->
<!-- Set your background image for this header on the line below. -->
<header id="post-header" class="has-cover">
<div class="inner">
<nav id="navigation">
<span id="home-button" class="nav-button">
<a class="home-button" href="/" title="Home"><i class="ic ic-arrow-left"></i> Home</a>
</span>
<span id="menu-button" class="nav-button">
<a class="menu-button"><i class="ic ic-menu"></i> Menu</a>
</span>
</nav>
<h1 class="post-title">awk 笔记</h1>
<!-- TODO : Proper class for headline -->
<span class="post-meta">
<a href="/author/yw.html">Yw</a>
| <time datetime="周四 29 十一月 2018">周四 29 十一月 2018</time>
</span>
<!-- TODO : Modified check -->
<div class="post-cover cover" style="background-image: url('/theme/images/post-bg.jpg')">
</div>
</header>
<section id="wrapper">
<a class="hidden-close"></a>
<!-- Post content -->
<main class="content" role="main">
<article class="post">
<div class="inner">
<section class="post-content">
<p>去掉fastq文件中的UMI(前21bp),再将文件输出到标准输出</p>
<ul>
<li>if else 嵌套判断</li>
<li>match() 函数</li>
<li>substr() 函数</li>
</ul>
<div class="highlight"><pre><span></span> cat <span class="nv">$fq</span> <span class="p">|</span> awk <span class="s1">'{</span>
<span class="s1"> if (match($0,/^@/))</span>
<span class="s1"> {</span>
<span class="s1"> print $0</span>
<span class="s1"> }</span>
<span class="s1"> else if ( $0=="+" )</span>
<span class="s1"> {</span>
<span class="s1"> print $0</span>
<span class="s1"> }</span>
<span class="s1"> else</span>
<span class="s1"> {</span>
<span class="s1"> print substr($0,22)</span>
<span class="s1"> }</span>
<span class="s1"> }'</span> <span class="p">|</span> less
</pre></div>
</section>
<section class="post-info">
<div class="post-share">
<a class="twitter" href="https://twitter.com/share?text=awk 笔记&url=/awk-bi-ji.html" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
<i class="ic ic-twitter"></i><span class="hidden">Twitter</span>
</a>
<a class="facebook" href="https://www.facebook.com/sharer/sharer.php?u=/awk-bi-ji.html" onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
<i class="ic ic-facebook"></i><span class="hidden">Facebook</span>
</a>
<a class="googleplus" href="https://plus.google.com/share?url=/awk-bi-ji.html" onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
<i class="ic ic-googleplus"></i><span class="hidden">Google+</span>
</a>
<div class="clear"></div>
</div>
<div class="clear"></div>
</section>
<aside class="post-nav">
<div class="clear"></div>
</aside>
</div>
</article>
</main>
<!-- TODO : Body class -->
<div id="body-class" style="display: none;" class=""></div>
<footer id="footer">
<div class="inner">
<section class="credits">
<span class="credits-theme">Theme <a href="https://github.com/arulrajnet/attila" rel="nofollow">Attila</a></span>
<span class="credits-software">Published with <a href="https://github.com/getpelican/pelican" rel="nofollow">Pelican</a></span>
</section>
</div>
</footer>
</section>
<script type="text/javascript" src="/theme/js/script.js"></script>
</body>
</html>