--- title: reads keywords: fastai sidebar: home_sidebar nb_path: "12_reads_head.ipynb" ---
{% raw %}
{% endraw %} {% raw %}
{% endraw %} {% raw %}
# retreat the 10 nucleotides before and after the read
{% endraw %} {% raw %}

retreat_upstreams_downstreams_from_read[source]

retreat_upstreams_downstreams_from_read(read, reference_o, sequence_length=10)

{% endraw %} {% raw %}

retreat_seq_from_fasta[source]

retreat_seq_from_fasta(fasta_o, contig, start, end, is_reverse=False)

{% endraw %} {% raw %}
{% endraw %} {% raw %}

extract_sequences[source]

extract_sequences(bam_file, fasta_file, padding=30, prefix='./extract_sequences')

extract sequences for motif identification

:param str bam_file: bam file path, with bam.bai in the same directory :param str fasta_file: reference fasta file path, with fasta.fai in the same directory :param int padding: the nucleotides number that retreated :param str prefix: output prefix, there will be six output files

{% endraw %} {% raw %}
{% endraw %} {% raw %}
# fasta_file='/expt/logan/database/homo_sapiens/100/genome.fa'
# prefix='tests/test'
# extract_sequences(bam_file,fasta_file,padding=30,prefix=prefix)
reading 0th reads
reading 10000th reads
reading 20000th reads
reading 30000th reads
reading 40000th reads
reading 50000th reads
reading 60000th reads
reading 70000th reads
reading 80000th reads
reading 90000th reads
reading 100000th reads
reading 110000th reads
reading 120000th reads
reading 130000th reads
reading 140000th reads
reading 150000th reads
reading 160000th reads
reading 170000th reads
reading 180000th reads
reading 190000th reads
reading 200000th reads
reading 210000th reads
reading 220000th reads
reading 230000th reads
reading 240000th reads
reading 250000th reads
reading 260000th reads
reading 270000th reads
reading 280000th reads
reading 290000th reads
reading 300000th reads
reading 310000th reads
reading 320000th reads
reading 330000th reads
reading 340000th reads
reading 350000th reads
reading 360000th reads
reading 370000th reads
reading 380000th reads
reading 390000th reads
reading 400000th reads
reading 410000th reads
reading 420000th reads
reading 430000th reads
reading 440000th reads
reading 450000th reads
reading 460000th reads
reading 470000th reads
reading 480000th reads
reading 490000th reads
reading 500000th reads
reading 510000th reads
reading 520000th reads
reading 530000th reads
reading 540000th reads
reading 550000th reads
reading 560000th reads
reading 570000th reads
reading 580000th reads
reading 590000th reads
reading 600000th reads
reading 610000th reads
reading 620000th reads
reading 630000th reads
reading 640000th reads
reading 650000th reads
reading 660000th reads
reading 670000th reads
reading 680000th reads
reading 690000th reads
reading 700000th reads
reading 710000th reads
reading 720000th reads
reading 730000th reads
reading 740000th reads
reading 750000th reads
reading 760000th reads
reading 770000th reads
reading 780000th reads
reading 790000th reads
reading 800000th reads
reading 810000th reads
reading 820000th reads
reading 830000th reads
reading 840000th reads
reading 850000th reads
reading 860000th reads
reading 870000th reads
reading 880000th reads
reading 890000th reads
reading 900000th reads
reading 910000th reads
reading 920000th reads
reading 930000th reads
reading 940000th reads
reading 950000th reads
reading 960000th reads
{% endraw %} {% raw %}
from nbdev.export import notebook2script
notebook2script()
Converted 00_utils_rd.ipynb.
Converted 01_pipelines.ipynb.
Converted 02_mains.ipynb.
Converted 03_utils_plots.ipynb.
Converted 04_utils_clusters.ipynb.
Converted 05_default.ipynb.
Converted 06_preprocess.ipynb.
Converted 07_merge_degfc.ipynb.
Converted 08_polya_sites.ipynb.
Converted 09_utils_multirun.ipynb.
Converted 10_utils_bamfilter.ipynb.
Converted 11_plots.ipynb.
Converted 12_reads_head.ipynb.
Converted index.ipynb.
{% endraw %}