情况:在下载的样本信息文本中,有些值是missing,于是想把这些值都删去。
1: G5568.2
Identifiers: BioSample: SAMN03254158; Sample name: G5568.2; SRA: SRS908547
Organism: Zaire ebolavirus
Attributes:
/isolate="Zaire ebolavirus isolate Ebola virus/H.sapiens-wt/SLE/2014/Makona-G5568.2"
/strain="missing"
/collected by="Kenema Government Hospital, Sierra Leone"
/collection date="2014-09-22"
/geographic location="Sierra Leone"
/host="Homo sapiens"
/host disease="Ebola Virus"
/isolation source="plasma"
/latitude and longitude="missing"
/culture collection="missing"
/genotype="missing"
/host age="missing"
/host description="missing"
/host disease outcome="missing"
/host disease stage="missing"
/host health state="missing"
方法:在vim中的命令模式输入
:g/missing/d
另存为samples_withoutmissing.txt,并退出。
wq ./samples_withoutmissing.txt