Mastering Python for Bioinformatics

How to Write Flexible, Documented, Tested Python Code for Research Computing

Paperback Engels 2021 1e druk 9781098100889
€ 116,12
Levertijd ± 16 werkdagen
Gratis verzonden

Samenvatting

Life scientists today urgently need training in bioinformatics skills. Too many bioinformatics programs are poorly written and barely maintained, usually by students and researchers who've never learned basic programming skills. This practical guide shows postdoc bioinformatics professionals and students how to exploit the best parts of Python to solve problems in biology while creating documented, tested, reproducible software.

Ken Youens-Clark, author of Tiny Python Projects (Manning), demonstrates not only how to write effective Python code but also how to use tests to write and refactor scientific programs. You'll learn the latest Python features and tools including linters, formatters, type checkers, and tests to create documented and tested programs. You'll also tackle 14 challenges in Rosalind, a problem-solving platform for learning bioinformatics and programming.

- Create command-line Python programs to document and validate parameters
- Write tests to verify refactor programs and confirm they're correct
- Address bioinformatics ideas using Python data structures and modules such as Biopython
- Create reproducible shortcuts and workflows using makefiles
- Parse essential bioinformatics file formats such as FASTA and FASTQ
- Find patterns of text using regular expressions
- Use higher-order functions in Python like filter(), map(), and reduce()

Specificaties

ISBN13:9781098100889
Taal:Engels
Bindwijze:paperback
Aantal pagina's:400
Uitgever:O'Reilly
Druk:1
Verschijningsdatum:18-5-2021
Hoofdrubriek:IT-management / ICT

Lezersrecensies

Wees de eerste die een lezersrecensie schrijft!

Inhoudsopgave

Preface
Who Should Read This?
Programming Style: Why I Avoid OOP and Exceptions
Structure
Test-Driven Development
Using the Command Line and Installing Python
Getting the Code and Tests
Installing Modules
Installing the new.py Program
Why Did I Write This Book?
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments

I. The Rosalind.info Challenges
1. Tetranucleotide Frequency: Counting Things
Getting Started
Creating the Program Using new.py
Using argparse
Tools for Finding Errors in the Code
Introducing Named Tuples
Adding Types to Named Tuples
Representing the Arguments with a NamedTuple
Reading Input from the Command Line or a File
Testing Your Program
Running the Program to Test the Output
Solution 1: Iterating and Counting the Characters in a String
Counting the Nucleotides
Writing and Verifying a Solution
Additional Solutions
Solution 2: Creating a count() Function and Adding a Unit Test
Solution 3: Using str.count()
Solution 4: Using a Dictionary to Count All the Characters
Solution 5: Counting Only the Desired Bases
Solution 6: Using collections.defaultdict()
Solution 7: Using collections.Counter()
Going Further
Review

2. Transcribing DNA into mRNA: Mutating Strings, Reading and Writing Files
Getting Started
Defining the Program’s Parameters
Defining an Optional Parameter
Defining One or More Required Positional Parameters
Using nargs to Define the Number of Arguments
Using argparse.FileType() to Validate File Arguments
Defining the Args Class
Outlining the Program Using Pseudocode
Iterating the Input Files
Creating the Output Filenames
Opening the Output Files
Writing the Output Sequences
Printing the Status Report
Using the Test Suite
Solutions
Solution 1: Using str.replace()
Solution 2: Using re.sub()
Benchmarking
Going Further
Review
Afgekapt op 62 regels

Managementboek Top 100

€ 116,12
Levertijd ongeveer 16 werkdagen
Gratis verzonden

Rubrieken

Producten

    Auteurs

      Trefwoorden

        Artikelen

          Mastering Python for Bioinformatics