首页 > 解决方案 > 从 snakemake 从 iRODS 服务器获取数据

问题描述

我正在尝试使用 snakemake 从 iRODS 服务器下载文件。

我已按照此处的说明进行操作。

我正在开发一个 GNU/Linux 计算机集群。

我在我的 Snakefile 的顶部有这个:

from snakemake.remote.iRODS import RemoteProvider

irods = RemoteProvider(irods_env_file='/nfs/users/nfs_c/username/.irods/irods_environment.json',
                       timezone="Europe/London") # all parameters are optional

此代码在 Python 解释器中运行顺畅,不会导致错误。

然后我有这个规则:

rule iget:
    input:
        irodsBam = irods.remote('/seq/path/to/my/file.bam')
    output:
        lustreBam = 'new/file/location/on/lustre.bam'
    conda:
        'envs/iget.yaml'
    shell:
        'iget -K -f {input.irodsBam} {output.lutreBam}'

在 yaml 文件中,我有这个:

channels:
  - bioconda
  - r
dependencies:
  - boto
  - moto
  - filechunkio
  - pysftp
  - dropbox
  - requests
  - ftputil
  - XRootD
  - biopython

我运行了snakemake:

snakemake --use-conda new/file/location/on/lustre.bam

我有一个错误:

Building DAG of jobs...
MissingInputException in line 146 of /lustre/projects/main/Snakefile:
Missing input files for rule igetPacbio:
/seq/path/to/my/file.bam

但是,我检查了 ils,我的 BAM 文件位于 iRODS 上的指定位置。

任何人都可以帮助我吗?

2018 年 11 月 13 日更新

我也试过这个规则:

rule iget:
    input:
        irodsBam = irods.remote('/seq/path/to/my/file.bam')
    output:
        'new/file/location/on/lustre.bam'
    conda:
        'envs/iget.yaml'
    shell:
        r"""
        touch {output}
        """

但错误是一样的:

MissingInputException

2018 年 11 月 24 日更新

ils /seq/pacbio/r54097_20170511_114349/1_A01/

/seq/pacbio/r54097_20170511_114349/1_A01:
  m54097_170511_115331.adapters.fasta
  m54097_170511_115331.scraps.bam
  m54097_170511_115331.scraps.bam.pbi
  m54097_170511_115331.sts.xml
  m54097_170511_115331.subreads.bam
  m54097_170511_115331.subreads.bam.pbi
  m54097_170511_115331.subreadset.xml

并且删除 '/seq/path/to/my/file.bam' 中的 '/' 不会改变错误。它仍然是 MissingInputException。

标签: snakemake

解决方案


推荐阅读