Skip to Content
Bioinformatics with Python Cookbook - Second Edition
book

Bioinformatics with Python Cookbook - Second Edition

by Tiago Antao
November 2018
Intermediate to advanced
360 pages
9h 36m
English
Packt Publishing
Content preview from Bioinformatics with Python Cookbook - Second Edition

How to do it…

  1. With Airflow, a pipeline specification is written in Python, which is quite convenient for us! Let's start with the import part:
from datetime import datetime, timedeltaimport osfrom os.path import isfilefrom airflow import DAGfrom airflow.operators.python_operator import PythonOperatorfrom airflow.contrib.hooks.ftp_hook import FTPHookfrom airflow.contrib.hooks.fs_hook import FSHookfrom airflow.contrib.sensors.file_sensor import FileSensor
  1. Our main object will be a Directed Acyclic Graph (DAG), which will include all the tasks and their dependencies. For now, we will specify a dictionary with some properties:
 dag_args = {    'owner': 'airflow',    'description': 'Bioinformatics with Python Cookbook pipeline', 'depends_on_past': ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Bioinformatics with Python Cookbook

Bioinformatics with Python Cookbook

Tiago Antao

Publisher Resources

ISBN: 9781789344691Supplemental Content