1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

3642302920 pyth split 1 4537

7 1 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề A Primer on Scientific Programming with Python Third Edition
Người hướng dẫn Hans Petter Langtangen
Trường học Texts in Computational Science and Engineering
Chuyên ngành Texts in Computational Science and Engineering
Thể loại Sách giáo trình
Năm xuất bản 2023
Định dạng
Số trang 7
Dung lượng 175,19 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com... Nieminen Dirk Roose Tamar Schlick Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com...

Trang 1

Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com

Trang 3

Texts in Computational Science

Editors

Timothy J Barth

Michael Griebel

David E Keyes

Risto M Nieminen

Dirk Roose

Tamar Schlick

Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com

Trang 5

Hans Petter Langtangen

A Primer on Scientific

Programming

with Python

Third Edition

Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com

Trang 6

Consider the function get_base_counts(dna) (from Chapter 6.6.3),

which counts how many times A, C, G, and Tappears in the string dna:

Unfortunately, this function crashes if other letters appear in dna.

Write an enhanced function get_base_counts2which solves this

prob-lem Test it on a string like ’ADLSTTLLD’ Name of program file:

def get_base_counts(dna):

counts = {’A’: 0, ’T’: 0, ’G’: 0, ’C’: 0}

for base in dna:

counts[base] += 1 return counts

Exercise 6.32 Find proportion of bases inside/outside exons.

Consider the lactase gene as described in Chapters 6.6.4and 6.6.5

What is the proportion of base A inside and outside exons of the

lac-tase gene? Write a functionget_exons, which returns all the substrings

of the exon regions concatenated, and a function get_introns, which

returns all the substrings between the exon regions concatenated The

function get_base_frequencies from Chapter 6.6.3 can then be used

to analyze the frequencies of bases A, C, G, and T in the two strings

Ngày đăng: 04/12/2022, 15:14