11#
douying052 新手上路 发表于 2017-11-1 14:39:44 | 只看该作者
1. EGFR-2_6695666_1984041856.zip (90.66 KB, 下载次数: 0) 你好,没有其他文件,请看附件2.做样例映射了 ,但是sample和variants只是第一行,annotation倒是全提出来了



举报 使用道具
12#
umsung 高级会员 发表于 2017-11-1 14:51:23 | 只看该作者
douying052 发表于 2017-11-1 14:39
1.你好,没有其他文件,请看附件2.做样例映射了,但是sample和variants只是第一行,annotation倒是全提出来 ...

那就把另外两个也自定义xpath定位
举报 使用道具
13#
douying052 新手上路 发表于 2017-11-1 15:59:37 | 只看该作者
非常感谢,不知道您知道如何自定义呢?我试了试都不太成功
举报 使用道具
14#
umsung 高级会员 发表于 2017-11-1 16:07:37 | 只看该作者
douying052 发表于 2017-11-1 15:59
非常感谢,不知道您知道如何自定义呢?我试了试都不太成功

方法和第三个是一样的
举报 使用道具
15#
douying052 新手上路 发表于 2017-11-1 16:09:54 | 只看该作者
//*[@class='odd EGFRLUAD-NYU1142T790M mutation-table-data-row']/td[position()=2],不太一样,第三个是class值,唯一的一个,但是这个里边EGFRLUAD-NYU1142T790M每一行都不一样,而且后边还有position,就搞不懂了
举报 使用道具
16#
douying052 新手上路 发表于 2017-11-1 16:38:09 | 只看该作者
我发现问题在哪了,我把annotation搞成Xpath自定义路径后,他就把第一行的收集起来,其他都不收集,因为定义的是contain,所有会把其他的含有level的都收集,有大问题
举报 使用道具
17#
数据集 高级会员 发表于 2017-11-1 16:48:51 | 只看该作者
douying052 发表于 2017-11-1 16:38
我发现问题在哪了,我把annotation搞成Xpath自定义路径后,他就把第一行的收集起来,其他都不收集,因为定 ...

那就不要包含level
举报 使用道具
18#
douying052 新手上路 发表于 2017-11-1 17:31:02 | 只看该作者
我看了看文件,是annotation这个Xpath路径搞错了,我看网上说前边要加.,还在研究怎么弄
举报 使用道具
19#
数据集 高级会员 发表于 2017-11-1 17:37:41 | 只看该作者
douying052 发表于 2017-11-1 17:31
我看了看文件,是annotation这个Xpath路径搞错了,我看网上说前边要加.,还在研究怎么弄 ...

嗯嗯,去学习下xpath基础,很快就会了。
举报 使用道具
20#
douying052 新手上路 发表于 2017-11-1 17:52:10 | 只看该作者
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:svg="http://www.w3.org/2000/svg" >
<xsl:template match="/">
<response>
<xsl:apply-templates select="//*[@class='display mutation_details_table dataTable no-footer']/tbody/tr[position()>=1 and count(.//*[@class='oncogenic-icon-image level1R oncogenic']/@class)>0]" mode="response"/>
</response>
</xsl:template>


<xsl:template match="//*[@class='display mutation_details_table dataTable no-footer']/tbody/tr[position()>=1 and count(.//*[@class='oncogenic-icon-image level1R oncogenic']/@class)>0]" mode="response">
<item>
<sample>
<xsl:value-of select="td[position()=1]"/>
</sample>
<variants>
<xsl:value-of select="*//*[@class='cc-short-study-name simple-tip']/text()"/>
<xsl:value-of select="*[@class='cc-short-study-name simple-tip']/text()"/>
<xsl:if test="@class='cc-short-study-name simple-tip'">
<xsl:value-of select="text()"/>
</xsl:if>
</variants>
<annotation>
<xsl:value-of select="*//*[@class='oncogenic-icon-image level1R oncogenic']/@class"/>
<xsl:value-of select="*[@class='oncogenic-icon-image level1R oncogenic']/@class"/>
<xsl:if test="@class='oncogenic-icon-image level1R oncogenic'">
<xsl:value-of select="@class"/>
</xsl:if>
</annotation>
</item>
</xsl:template>
</xsl:stylesheet>
这个里边如何xpath定位呢?又回到原来的问题了
举报 使用道具
您需要登录后才可以回帖 登录 | 立即注册

精彩推荐

  • Gephi社会网络分析-马蜂窝游记文本分词并同
  • Gephi社会网络分析-基于马蜂窝游记文本以词
  • 知乎话题文本根据词语间距筛选后生成共词矩
  • 马蜂窝游记文本分词后以词语间距为筛选条件
  • 学习使用apriori算法挖掘关联关系

热门用户

GMT+8, 2024-5-14 19:56