【发布时间】:2018-12-19 10:12:23
【问题描述】:
我想提取唯一的对象 Scaffold 和每个字符串的脚手架数量(例如脚手架 6)。有任何想法吗?
[2] "KQ415657.1 isolate UCB-ISO-001 unplaced genomic scaffold Scaffold5, whole genome shotgun sequence"
[3] "ABCD0100000.1 isolate UCB-ISO-001 Scaffold6_contig_1, whole genome shotgun sequence"
[4] "ABCDD0100001.1 isolate UCB-ISO-001 Scaffold8_contig_1, whole genome shotgun sequence"
[5] "ABCD0100002.1 isolate UCB-ISO-001 Scaffold2_contig_1, whole genome shotgun sequence"
[6] "ABCD0100003.1 isolate UCB-ISO-001 Scaffold6_contig_1, whole genome shotgun sequence"
[7] "ABCD0100004.1 isolate UCB-ISO-001 Scaffold2_contig_1, whole genome shotgun sequence"
[8] "ABCD0100005.1 isolate UCB-ISO-001 Scaffold7_contig_1, whole genome shotgun sequence"
[9] "ABCD0100006.1 isolate UCB-ISO-001 Scaffold8_contig_1, whole genome shotgun sequence"
【问题讨论】:
-
stringr::str_extract(x,"Scaffold[0-9]+"). -
就是这样..谢谢!