Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
R Bioinformatics Cookbook
R Bioinformatics Cookbook

R Bioinformatics Cookbook: Utilize R packages for bioinformatics, genomics, data science, and machine learning , Second Edition

eBook
€20.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

R Bioinformatics Cookbook

Loading, Tidying, and Cleaning Data in the tidyverse

Cleaning data is a crucial step in the data science process. It involves identifying and correcting errors, inconsistencies, and missing values in the data, as well as formatting and structuring the data in a way that makes it easy to work with. This allows the data to be used effectively for analysis, modeling, and visualization. The R tidyverse is a collection of packages designed for data science and includes tools for data manipulation, visualization, and modeling. The dplyr and tidyr packages are two of the most widely used packages within the tidyverse for data cleaning. dplyr provides a set of functions for efficiently manipulating large datasets, such as filtering, grouping, and summarizing data. tidyr is specifically designed for tidying (or restructuring) data, making it easier to work with. It provides functions for reshaping data, such as gathering and spreading columns, and allows for the creation of a consistent structure in the data. This makes it easier to perform data analysis and visualization. Together, these packages provide powerful tools for cleaning and manipulating data in R, making it a popular choice among data scientists. In this chapter, we will look at tools and techniques for preparing data in the tidyverse set of packages. You will learn how to deal with different formats and quickly interconvert them, merge different datasets, and summarize them. You will also learn how to bring data from outside sources not in handy files into your work.

In this chapter, we will cover the following recipes:

  • Loading data from files with readr
  • Tidying a wide format table into a tidy table with tidyr
  • Tidying a long format table into a tidy table with tidyr
  • Combining tables using join functions
  • Reformatting and extracting existing data into new columns using stringr
  • Computing new data columns from existing ones and applying arbitrary functions using mutate()
  • Using dplyr to summarize data in large tables
  • Using datapasta to create R objects from cut-and-paste data

Technical requirements

We will use renv to manage packages in a project-specific way. To use renv to install packages, you will first need to install the renv package. You can do this by running the following commands in your R console:

  1. Install renv:
    install.packages("renv")
  2. Create a new renv environment:
    renv::init()

This will create a new directory called .renv in your current project directory.

  1. You can then install packages with the following command:
    renv::install_packages()
  2. You can also use the renv package manager to install Bioconductor packages by running the following command:
    renv::install("bioc::package name")
  3. For example, to install the Biobase package, you would run the following command:
    renv::install("bioc::Biobase")
  4. You can use renv to install development packages from GitHub like this:
    renv::install("user name/repo name")
  5. For example, to install the danmaclean user rbioinfcookbook package, you would run the following command:
    renv::install("danmaclean/rbioinfcookbook")

You can also install multiple packages at once by separating the package names with a comma. renv will automatically handle installing any required dependencies for the packages you install.

Under renv, all packages will be installed into the local project directory and not the main central library, meaning you can have multiple versions of the same package—a specific one for each project.

All the sample data you need for this package is in the specially created danmaclean/rbioinfcookbook data package on GitHub. The data will become available in your project after installing that.

For this chapter, we’ll need the following packages:

  • Regular packages:
    • dplyr
    • fs
    • readr
    • tidyr
    • stringr
    • purrr
  • GitHub:
    • danmaclean/rbioinfcookbook
  • Custom install:
    • datapasta

In addition to these packages, we will also need some R tools such as conda; all these will be described when needed.

Further information

The packages that require a custom install procedure will be described in the relevant recipes.

In R, it is normal practice to load a library and use functions directly by name. Although this is great in short interactive sessions, it can cause confusion when many packages are loaded at once and share function names. To clarify which package and function I am using at a given moment, I will occasionally use the packageName::functionName() convention.

Sometimes, in the middle of a recipe I’ll interrupt the code to dive into some intermediate output or to look at the structure of an object. When that happens, you’ll see a code block where each line begins with ## (double hash symbols). Consider the following command:

letters[1:5]

This will give us the following output:

## a b c d e

Note that the output lines are prefixed with ##.

Left arrow icon Right arrow icon

Key benefits

  • Apply modern R packages to process biological data using real-world examples
  • Represent biological data with advanced visualizations and workflows suitable for research and publications
  • Solve real-world bioinformatics problems such as transcriptomics, genomics, and phylogenetics
  • Purchase of the print or Kindle book includes a free PDF eBook

Description

The updated second edition of R Bioinformatics Cookbook takes a recipe-based approach to show you how to conduct practical research and analysis in computational biology with R. You’ll learn how to create a useful and modular R working environment, along with loading, cleaning, and analyzing data using the most up-to-date Bioconductor, ggplot2, and tidyverse tools. This book will walk you through the Bioconductor tools necessary for you to understand and carry out protocols in RNA-seq and ChIP-seq, phylogenetics, genomics, gene search, gene annotation, statistical analysis, and sequence analysis. As you advance, you'll find out how to use Quarto to create data-rich reports, presentations, and websites, as well as get a clear understanding of how machine learning techniques can be applied in the bioinformatics domain. The concluding chapters will help you develop proficiency in key skills, such as gene annotation analysis and functional programming in purrr and base R. Finally, you'll discover how to use the latest AI tools, including ChatGPT, to generate, edit, and understand R code and draft workflows for complex analyses. By the end of this book, you'll have gained a solid understanding of the skills and techniques needed to become a bioinformatics specialist and efficiently work with large and complex bioinformatics datasets.

Who is this book for?

This book is for bioinformaticians, data analysts, researchers, and R developers who want to address intermediate-to-advanced biological and bioinformatics problems by learning via a recipe-based approach. Working knowledge of the R programming language and basic knowledge of bioinformatics are prerequisites.

What you will learn

  • Set up a working environment for bioinformatics analysis with R
  • Import, clean, and organize bioinformatics data using tidyr
  • Create publication-quality plots, reports, and presentations using ggplot2 and Quarto
  • Analyze RNA-seq, ChIP-seq, genomics, and next-generation genetics with Bioconductor
  • Search for genes and proteins by performing phylogenetics and gene annotation
  • Apply ML techniques to bioinformatics data using mlr3
  • Streamline programmatic work using iterators and functional tools in the base R and purrr packages
  • Use ChatGPT to create, annotate, and debug code and workflows

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 31, 2023
Length: 396 pages
Edition : 2nd
Language : English
ISBN-13 : 9781837633821
Concepts :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Oct 31, 2023
Length: 396 pages
Edition : 2nd
Language : English
ISBN-13 : 9781837633821
Concepts :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 111.97
Bioinformatics with Python Cookbook
€43.99
The Statistics and Machine Learning with R Workshop
€37.99
R Bioinformatics Cookbook
€29.99
Total 111.97 Stars icon

Table of Contents

15 Chapters
Chapter 1: Setting Up Your R Bioinformatics Working Environment Chevron down icon Chevron up icon
Chapter 2: Loading, Tidying, and Cleaning Data in the tidyverse Chevron down icon Chevron up icon
Chapter 3: ggplot2 and Extensions for Publication Quality Plots Chevron down icon Chevron up icon
Chapter 4: Using Quarto to Make Data-Rich Reports, Presentations, and Websites Chevron down icon Chevron up icon
Chapter 5: Easily Performing Statistical Tests Using Linear Models Chevron down icon Chevron up icon
Chapter 6: Performing Quantitative RNA-seq Chevron down icon Chevron up icon
Chapter 7: Finding Genetic Variants with HTS Data Chevron down icon Chevron up icon
Chapter 8: Searching Gene and Protein Sequences for Domains and Motifs Chevron down icon Chevron up icon
Chapter 9: Phylogenetic Analysis and Visualization Chevron down icon Chevron up icon
Chapter 10: Analyzing Gene Annotations Chevron down icon Chevron up icon
Chapter 11: Machine Learning with mlr3 Chevron down icon Chevron up icon
Chapter 12: Functional Programming with purrr and base R Chevron down icon Chevron up icon
Chapter 13: Turbo-Charging Development in R with ChatGPT Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7
(3 Ratings)
5 star 66.7%
4 star 33.3%
3 star 0%
2 star 0%
1 star 0%
Rudrendu Kumar Paul Nov 04, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The R Bioinformatics Cookbook by Dan MacLean is a practical, comprehensive guide aimed at bioinformaticians looking to expand their data analysis skills using R and Bioconductors. With the author's extensive background in genomics, molecular biology, and bioinformatics, readers can trust that the book provides authoritative content.A major strength of the cookbook format is it supplies readers with recipe-based solutions to tackle common bioinformatics challenges. Rather than just theory, professionals get hands-on guidance to put concepts into practice. The book spans a versatile range of topics - from the initial setup of the R environment to sophisticated methods like machine learning. This ensures readers can find both introductory building blocks as well as more advanced techniques to round out their skills.Notably, the book thoroughly covers specialized packages and frameworks within the R ecosystem that are tailored for bioinformatics. Readers are immersed in the diverse capabilities of Bioconductor along with packages like ggplot2 for publication-quality graphics and mlr3 for machine learning. The focus on R capabilities designed for biological data analysis is a distinguishing factor.The content covers crucial bioinformatics techniques such as RNA-seq analysis, variant calling from DNA sequencing data, statistical modeling, and phylogenetic approaches. There is also a significant emphasis on data visualization and interpretation - essential skills for research. Interactive elements utilizing Shiny and Quarto demonstrate new avenues for impactful data presentation.While the book is geared towards those with some existing R familiarity, beginners may need help due to the assumed knowledge and density of information spanning many techniques. However, intermediate to advanced R users in bioinformatics will find an invaluable guide for expanding their toolkit in a hands-on manner. They can level up skills in both fundamental and cutting-edge data analysis areas.Additional topics could potentially enhance the book even further. As biological datasets explode in size, guidance on leveraging cloud computing could prove useful. More coverage of sophisticated machine learning methods like deep learning would keep readers abreast of the latest techniques for modeling complex data. Single-cell sequencing and metagenomics represent rapidly growing areas where extra content would make this guide more comprehensive for the field.The R Bioinformatics Cookbook is a practical, authoritative resource for bioinformaticians looking to hone their R skills for impactful data analysis. The hands-on solutions, specialized coverage of R packages, and techniques like statistical modeling and visualization make it a robust guide for intermediate to advanced practitioners seeking to expand their toolkits. While beginners may need more foundational content, the book's recipe-based approach helps professionals readily apply concepts to real-world biological studies.
Amazon Verified review Amazon
Amazon Customer Nov 04, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
AI practitioners looking to upgrade their data analysis skills with R, the R Bioinformatics Cookbook by Dan MacLean offers an authoritative, practical guide. True to its name, the cookbook format provides proven recipes to solve common challenges faced in biological research. Rather than just theory, professionals get hands-on solutions readily applicable to real-world work.The book strikes an effective balance between breadth and depth across two dimensions. First, it spans a diverse range of topics - from R environment setup to advanced machine learning. Second, it delves deeply into specialized R packages tailored for bioinformatics within the expansive Bioconductor ecosystem. Readers tour the diverse landscape of tools designed specifically for genomics and computational biology.Notably, the book moves beyond just core techniques to incorporate cutting-edge methods poised to shape the future. The coverage of sophisticated machine learning using mlr3 and interactive dashboards with Shiny/Quarto keeps readers ahead of the curve. While leveraging time-tested tools like ggplot2 for publication-quality graphics, the book also showcases next-gen avenues for analysis and communication.The content is firmly rooted in the practical needs of bioinformaticians. Crucial workflows like sequencing data analysis, statistical modeling, and phylogenetics all receive thorough treatment. Each chapter focuses on a single technique, ensuring digestible depth. And code is structured to promote understanding and extensibility rather than just solutions.For readers with some existing R familiarity, the book serves as an invaluable springboard to enhanced productivity. It provides building blocks to level up both fundamental and advanced skills. However, complete beginners may need supplementary learning first to establish core competencies before benefiting fully. The assumed knowledge makes this more suited for intermediate learners onward.To make this comprehensive guide even more holistic, additional topics on large-scale cloud computing, deep learning for omics data, and single-cell analysis could prove valuable amendments. As data complexity escalates, guidance on these emerging fronts would increase the book's utility for tackling real-world biological complexities.The practitioners seeking to expand their R toolkit in order to derive greater insights from modern molecular datasets, the R Bioinformatics Cookbook hits the sweet spot between theory and practice. Its competent stewardship of both foundational and innovative R-based techniques makes it a recipe for success in bioinformatics.
Amazon Verified review Amazon
Om S Nov 09, 2023
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
In the second edition of the "R Bioinformatics Cookbook," readers are taken on a hands-on journey through over 80 recipes, providing a practical guide to conducting research and analysis in computational biology using the R ecosystem. The book emphasizes real-world applications, offering a treasure trove of modern R packages for processing biological data with tangible examples. From setting up a functional R working environment to analyzing RNA-seq, ChIP-seq, genomics, and more, each chapter introduces essential tools and techniques for bioinformatics enthusiasts.The book's strength lies in its recipe-based approach, allowing bioinformaticians, data analysts, researchers, and R developers to tackle intermediate-to-advanced biological problems effectively. Notably, the inclusion of Bioconductor, ggplot2, and Quarto tools enhances the reader's ability to represent biological data through advanced visualizations suitable for research and publication. The concluding chapters delve into machine learning with mlr3 and harnessing the power of ChatGPT for code generation and workflow understanding. With a clear structure and a focus on practical applications, this cookbook equips readers to become proficient bioinformatics specialists, navigating the complexities of large and intricate biological datasets.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.