allonsyeet
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Identification of a possible regulatory site in genomic DNA Reference - http://www.people.vcu.edu/~elhaij/IntroBioinf/Scenarios/Scenario-RegulatorySite.html ![ Filament of Nostoc. The green cells are photosynthetic vegetative cells. The pale cell is a heterocyst, specialized for nitrogen fixation](https://hackmd.io/_uploads/Hk-k7zRaT.png) Filament of Nostoc. The green cells are photosynthetic vegetative cells. The pale cell is a heterocyst, specialized for nitrogen fixation ## Nitrogen-fixing cyanobacteria: Eat air and prosper! Certain cyanobacteria, amongst them Nostoc PCC 7120, are among the only creatures on earth able to survive on CO2 as a source of carbon, N2 as a source of nitrogen, water as a source of electrons, and sunlight as a source of energy. This is quite a trick, because the process of fixing carbon with electrons from water necessarily produces O2 as a byproduct and the process of fixing N2 is irreversibly inactivated by tiny amounts of oxygen. Nostoc is able to protect the machinery of nitrogen-fixation from inactivation by producing specialized cells, called heterocysts, that rigorously exclude oxygen from within them. ## The cost of fixing nitrogen: How to pay only when necessary? Heterocysts are expensive to make and maintain, however, and you are interested studying the mechanism by which Nostoc regulates the appearance of heterocysts. When an alternative source of nitrogen is present, Nostoc makes no heterocysts. When that source is consumed or removed, vegetative cells differentiate into heterocysts within about 18 hours. How do the cells sense nitrogen deprivation and translate that perception into the induction of the genes necessary for heterocyst differentiation? At present, the answer to this question is not known. ## The discovery: starvation ==> *** NtcA-BINDING *** ==> heterocyst differentiation You are studying the regulation of the gene hetR, whose product is known to be critical in controlling heterocyst differentiation. You're focusing on the protein HetQ, which you believe regulates the expression of hetR. Your plan is to make random mutations in hetQ (which encodes HetQ), hoping to understand from the resulting mutant protein how the regulation is achieved. In examining the sequence upstream of hetQ, you happen to notice the presence of the sequence: atctGTAacatgagaTACacaatagcatttatatttgcttTAgtaTctct The capital letters, you recognize, meet all the requirements of a binding site for the protein NtcA, known to mediate the expression of many genes sensitive to nitrogen-deprivation. Maybe, just maybe, you have accidently discovered the missing link that connects nitrogen-deprivation to the regulation of heterocyst genes! ## The discovery? How do you know? Unfortunately, you need hard evidence that NtcA actually binds to that site before anyone will believe your theory. And hard evidence means spending the better part of a year measuring the binding of NtcA to your sequence in the test tube. If it DOESN'T bind, then you've wasted a lot of time. Is there any way to assess the LIKELIHOOD that NtcA will bind to your sequence without actually having to do time-consuming experiments? How can you tell whether the sequence you found might not have arisen by chance without regard to function? ## Problem Use bioinformatic tools to assess the likelihood of encountering a specific DNA sequence by chance. ## Resources - [Molecular Biology Background](http://www.people.vcu.edu/~elhaij/IntroBioinf/Notes/RegulatoryProtein.pdf) ## Tools ### Simulation Make up a large number of sequences. Ask in each case whether the sequence fits the criteria for an NtcA binding site. Count how many times it does, how many times it doesn't. ### Pattern recognition Scan the genome of Nostoc PCC 7120 and count how many sequences fit the pattern of an NtcA binding site. #### Regular Expressions The pattern you're looking for can be expressed as a regular expression. These are rules for matching patterns of characters. Our particular regular expression, [as explained here](http://www.people.vcu.edu/~elhaij/IntroBioinf/ProblemSets/PS1P.html) is > `GTA.{8}TAC.{20,24}TA.{3}T` > which stand for `GTA` followed by a gap of eight positions, then `TAC` followed by a gap of 20 to 24 positions, then `TA` followed by a gap of three positions and a `T`. This can be visualized [here](https://regex101.com). Paste the regex into the top bar, and then paste the sequence `atctGTAacatgagaTACacaatagcatttatatttgcttTAgtaTctct` into the text box below. You can try learning more about regular expressions [here](https://regexone.com/). Once you're comfortable enough to understand the above expression, move on to the following programming tasks. ## Programming Tasks 1. Write a program that takes as input the length of a sequence $L$ and the number of sequences $N$ and outputs $N$ DNA sequences of length $L$ generated randomly. Each nucleotide is equally likely to occur in the sequence at any position. 2. Write a program that takes as input an array of size $N$ which contains sequences of length $L$ and finds the number of times the pattern `GTA.{8}TAC.{20,24}TA.{3}T` occurs in it and where it occurs. You may need to refer to [Julia RegExp Documentation](https://docs.julialang.org/en/v1/manual/strings/#man-regex-literals). 3. Download the [genome of Nostoc sp. PCC 7120](https://www.ncbi.nlm.nih.gov/datasets/genome/GCF_000009705.1/) and load in the FASTA file. There are two ways you can do this. - **Relatively easy way that is still insightful** -- Use [FASTX.jl](https://github.com/BioJulia/FASTX.jl) to read in the file and store all the sequences in an array. - **Significantly harder way for programming practice** -- Since it's a text file, you can open it, read it and store each sequence in the file as a string and the set of all sequences in an array. You will have to write a function to parse the file. The format can be found [here](https://en.wikipedia.org/wiki/FASTA_format#Overview). 4. Use the program from step 2 to count the number of times we see a NtcA-Binding siite in this genome. Let's call this number $N_0$ 5. Using the program in step 1, randomly generate genomes with the same number of sequences as the genome of Nostoc sp. PCC 7120 and of the same length. If the length varies, pick `80`. Then using program 2, find the number of occurances the NtcA-Binding site in this randomly generated genome. 6. Repeat step 5 many many times and each time, store the number of NtcA-Binding sites found. Plot a histogram of this. 7. Using this data, find the probabilitiy that a randomly generated sequences has *at least* $N_0$ NtcA-Binding sites. As a scientist, what can you conclude from this? --- ## Checklist - [x] Write a program that takes as input the length of a sequence $L$ and the number of sequences $N$ and outputs $N$ DNA sequences of length $L$ generated randomly. Each nucleotide is equally likely to occur in the sequence at any position. - [x] Write a program that takes as input an array of size $N$ which contains sequences of length $L$ and finds the number of times the pattern `GTA.{8}TAC.{20,24}TA.{3}T` occurs in it and where it occurs. You may need to refer to [Julia RegExp Documentation](https://docs.julialang.org/en/v1/manual/strings/#man-regex-literals). - [x] Download the [genome of Nostoc sp. PCC 7120](https://www.ncbi.nlm.nih.gov/datasets/genome/GCF_000009705.1/) and load in the FASTA file. There are two ways you can do this. - **Relatively easy way that is still insightful** -- Use [FASTX.jl](https://github.com/BioJulia/FASTX.jl) to read in the file and store all the sequences in an array. - **Significantly harder way for programming practice** -- Since it's a text file, you can open it, read it and store each sequence in the file as a string and the set of all sequences in an array. You will have to write a function to parse the file. The format can be found [here](https://en.wikipedia.org/wiki/FASTA_format#Overview). - [x] Use the program from step 2 to count the number of times we see a NtcA-Binding siite in this genome. Let's call this number $N_0$ - [x] Using the program in step 1, randomly generate genomes with the same number of sequences as the genome of Nostoc sp. PCC 7120 and of the same length. If the length varies, pick `80`. Then using program 2, find the number of occurances the NtcA-Binding site in this randomly generated genome. - [ ] Repeat step 5 many many times and each time, store the number of NtcA-Binding sites found. Plot a histogram of this. - [ ] Using this data, find the probabilitiy that a randomly generated sequences has *at least* $N_0$ NtcA-Binding sites. As a scientist, what can you conclude from this?

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully