Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 General Function Checklist


Graph Track Operators

Note: Be sure to look at the user guide pages linked here. Skim them to make sure that the topics they cover are represent here (if not add points here as needed). Read enough to ensure that the instructions and explanations are clear, and the page has page has accurate information and generally appears up-to-date. 

See Users Guide pages:

Add the Even Numbers test file

Get the graph track operations test file.  There is probably a copy in the code base in the test sources in the Track Operations module.

You can just paste this into a text file, or download it from here:  TrackOperationsTesting1.bedgraph

# genome_version = A_thaliana_Jun_2009
track type=bedgraph name="TrackOperationsTesting1" description="Even numbers" color=0,128,0
Chr1 0 245144 0
Chr1 245144 735432 2
Chr1 735432 1470864 4
Chr1 1470864 2206296 8
Chr1 2206296 3186872 16
Chr1 3186872 3922304 20
Chr1 3922304 4412592 14
Chr1 4412592 4657736 20
Chr1 4657736 5148024 10
Chr1 5148024 5393168 6
Chr1 5393168 5638312 6
Chr1 5638312 5883456 4
Chr2 0 245144 2
Chr2 245144 490288 2
Chr2 490288 735432 2
Chr2 735432 1225720 4
Chr2 1225720 1470864 4
Chr2 1470864 1716008 8
Chr2 1716008 2206296 8
Chr2 2206296 186872 16
Chr2 3186872 3922304 20
Chr2 3922304 4167448 14
Chr2 4167448 4412592 0
Chr2 4412592 4657736 20
Chr2 4657736 4902880 10
Chr2 4902880 5148024 10
Chr2 5148024 5393168 6
Chr2 5393168 5638312 0
Chr2 5638312 5883456 0

 


  1. Add the track operations test file
.  You can do this without selecting any genome, just drag/drop
  1. to IGB by dragging/dropping the file onto the home screen. 
  2. Change the Load Mode to Genome
  3. In the Graph panel at the bottom of IGB, under Options, select StairStep.

 Image Added

 

Image Removed
Warning

 You may need to adjust the y-axis scale for each graph track.


Single Track Operations - part 1 - add and subtract

Go to the Graph panel, and select
  1. Click on the Even
Numbers
  1. numbers track.
Under
  1. In the Graph panel at the bottom of IGB, under Operations, under Single-Graph, select Add.
  If there was not already
  • There is a box to enter a value, one should appear. Enter 1 and hit "Go".  This should create a new track, next to Single-Graph that you can add values to.
  •  mac
  •  linux
  •  windows


Enter 1 in the box next to Single-Graph and hit Go

  •  A new track was created with yellow highlight around the track label.
  •  mac
  •  linux
  •  windows


Enter 2 in the box next to Single-Graph and hit

"

Go

".  This will create another new track.
    •  There is a box to enter a value to add
    •  A new track is created each time you hit Go.

.

  • Another new track was created with yellow highlight around the track label.
  •  mac
  •  linux
  •  windows


  1. Select Copy, and hit Go.
  •  There is no box for entering a value
  •  A new track is created
  1. Select Divide, enter 2, hit Go.
  2. Select Subtract, enter 4, hit Go.
Use the
  1. Click Select All
button (upper left of Graph panel) to select all of these tracks
  1. .  
  2. Select StairStep.
  3. Adjust the width of the label box so you can see the full label for each track.
Compare your window to

Image Added

  • Your IGB looks like the image below

Image Removed

  • Observe that: above.
  •  mac
  •  linux
  •  windows
  • All of the tracks you've created have a yellow highlight in the label box.
  •  mac
  •  linux
  •  windows
  • All of the tracks have appropriate names, which include the function, any values you added, and the name of the original track.
  •  mac
  •  linux
  •  windows
  • All of the graphs are shaped like the original, (subtract may look a little different because the relative position of zero has changed.
  •  mac
  •  linux
  •  windows


  1. Click in the original track in the region that has the value 16 (see the zoom stripe in the image above).
  2. Go to the Selection Information panel.
  •  In the original track, the y coord value should be 16; make sure you are in the right region.
  1. Click the same area in each of the tracks that you created and verify that their values are as follows:
 
    1. Add 1
:
    1. = 17
 
    1. Add 2
:
    1. = 18
 
    1. Copy
:
    1. = 16
 
    1. Divide by 2
:
    1. = 8
 
    1. Subtract 4
:
    1. = 12
  •  mac
  •  linux
  •  windows


Go to the Data Access panel and remove each of the tracks you created. 

Single Track Operations - part 2 - powers

  1. Go to the Graph panel, and select the Even Numbers track.
  2. Select Multiply, enter 2, and hit Go.
  3. Select Sqrt, hit Go.
  4. Select Power, enter 2, and hit Go.
  5. Select Power, enter 3, and hit Go.
  6. Use the Select All button (upper left of Graph panel) to select all of these tracks. 
  7. Select StairStep.
  8. Adjust the width of the label box so you can see the full label for each track.
  • Compare your window to the image below
  • Image Removed

    Observe that: 

    Image Added

    • Your IGB looks like the image above.
    •  mac
    •  linux
    •  windows
    • All of the tracks you've created have a yellow highlight in the label box.
    •  mac
    •  linux
    •  windows
    • All of the tracks have appropriate names, which include the function, any values you added, and the name of the original track.
    •  mac
    •  linux
    •  windows
    • All of the graphs are shaped like the they are in the above image.
    •  mac
    •  linux
    •  windows


    1. Go to the Selection Information panel.
    •  In the original track, the y coord value should be 16; make sure you are in the right region.
    1. Click the same area in each of the tracks that you created and verify that their values are as follows:
     
      1. Multiply by 2
    :
      1. = 32
     
      1. Sqrt
    :
      1. = 4
     
      1. Power 2:
     
      1. = 256
     
      1. Power 3
    :
      1. = 4,096
    •  mac
    •  linux
    •  windows


    1. Go to the Data Access panel and remove each of the tracks you created.
    2. Return to the Graph panel, and select the Even Numbers track.

    Single Track Operations - part 3 - log and inverse

    1. Go to the Graph panel
    ,
    1. and select the Even Numbers track.
    2. Select Inverse, hit Go.
    3. Select Natural Log, hit Go.
    4. Select Log, enter 3, hit Go.
    5. Select all three of these tracks
    ; hold
    1. by holding the shift key and
    click
    1. clicking on each. 
    2. With all three selected, do the following:
      1. Change the foreground (FG) color
    to
      1.  to pink.
      2. Select the Inverse single
    track
      1. graph operation, then hit Go
     observe that this creates 3
      1. .
    • Three new pink tracks were created.
    •  mac
    •  linux
    •  windows


    1. Select the Even Numbers track and the Inverse: Inverse: Even Numbers track.
    2. Select the Multi-Graph operation Diff, then hit Go.
    3. Select all tracks and choose StairStep
    4. Deselect all tracks.
    5. Select:
      1. Inverse: Natural Log: Even Numbers
      2. Inverse: Log 3: Even Numbers
      3. Inverse: Even Numbers
    6. In the Graph panel, set the Y Axis Scale to:
      1. Min: 0
      2. Max: 1
    7. Deselect all. (See that the tracks make hills and valleys. The inverse tracks show the opposite trends as the non-inverse or double-inverse tracks.)
    8. Select the track called Diff Even Numbers, Inverse: Inverse: Even Numbers.
    9. Right click the track label.
    10. Choose Save Track As...
    11. Save the track
    , suggested
    1. with the following name: InverseInverseDiff
    2. Open this file, and see that all values are 0 (or trivially far from 0).

    Image RemovedImage Added

    Observe that:

     
    • The Diff Inverse Inverse track has all 0-values. Notice that the top and bottom of the y-axis for this track in the image above are 0.
    •  mac
    •  linux
    •  windows
    • The shapes and names of tracks corresponds to the image above.
    •  mac
    •  linux
    •  windows


    Go to the Data Access panel and remove each of the tracks you created Except:  "Inverse: Log3", and "Inverse: Natural Log" . Return to the Graph panel, and select the Even Numbers track.

    Single Track Operations - part 4 - inverse logs

    1. Go to the Graph panel
    ,  "Inverse: Log3", and "Inverse: Natural Log" tracks (from previous section) make them now
    1. and select the Even Numbers track.
    If you don't already have the 
    1. Select Log 2, hit Go.
    2. Select Log 10, hit Go.
    3. Select Log
    2
    1. , enter 3, hit Go.
    2. Select Natural Log
    10
    1. , hit Go.
    2. Select the Log 2: Even Numbers track, select the
    inverse
    1. Inverse Log 2 operation, hit
    go
    1. Go.
    2. Delete the
    Log 2
    1. Log2: Even Numbers track.
    2. Select the Log 10: Even Numbers track, select the
    inverse
    1. Inverse Log 10 operation, hit
    go
    1. Go.
    2. Delete the Log 10: Even Numbers track.
    3. Select
    all of the created tracks and make them all pink and set all to StairStep.Select the
    1. the Log 3: Even Numbers track,
    Select Select
    1. select the Inverse Log operation, enter 3, hit Go.
  • Select Inverse Log 2, hit Go
  • Select Inverse Log 10, hit Go
    1. Delete the Log 3: Even Numbers track.
    2. Select the Natural Log: Even Numbers track, select the Inverse Natural Log operation, hit Go.

    Arrange the tracks so that the green track "Inverse Thing" is above the corresponding pink track "Inverse: Thing".  Set all track to StairStep.  See image.

    Image Removed

    For each pair, use the Milti-Graph operation Diff to create a new track.   Make these new tracks blue, and StairStep.  Like the Diff Inverse Inverse case above, these blue tracks should be all 0-values.

    Verify that:

    •  The blue tracks are all essentially 0, or only trivially different from 0 (values like 9.536743E-7)
     The shape of each pink/green pair is the same.  (The current image does shows that this is NOT the case, likely a bug)

    Go to the Selection Info panel and verify that all tracks have the expected y coord corresponding to the original value of 16:

    •  inverse of log (16, base=3):  0.3962406
    •  inverse of log (16, base=2):  0.25
    •  inverse of log (16, base=10):  0.830482
     inverse of natural log of 16: 0.3606738
    1. Delete the Natural Log: Even Numbers track.
    2. Set all created tracks to StairStep.

    Image Added

    • All of the created tracks look identical to the even number track (as illustrated in the picture above).
      •  Mac
      •  Windows
      •  Linux


    Go to the Data Access panel and remove each of the tracks you created Except:  "Inverse: Log3", and "Inverse: Natural Log" . Return to the Graph panel, and select the Even Numbers track.

     

    Saving a Track

    1. Add the track operations test file.
     
    1. You can do this without selecting any genome, just drag/drop the file onto the home screen. 
    2. Change the Load Mode to Genome.
     Make the Odd Numbers track:
    1. Select the Even Numbers track.
     
    1. In the Graph panel, under Operations, under Single-Graph, select Add, and enter 1.
    2. Select
    All
    1. all graph tracks
    ,
    1. and set them to StairStep.
    2. Go to the Data Access panel.
     
    • The new track
    should be
    • is called "Add 1.0: Even Numbers".  
    •  Mac
    •  Windows
    •  Linux


    1. Change the Track Name to
    "
    1. Odd Numbers
    "
    1. .
    2. Change the foreground color (FG) to light blue.
    3. Right click on the Odd Numbers track label area and click Save Track As...
    .
    1. Save the file
    as TrackOperationsTest2
    1. as TrackOperationsTest2, keep the bedgraph file type.
    2. Add this file (the one you just created) to IGB. 
    3. Click load data, and set it to StairStep.
     verify that the


    •  The track read from the saved file and is completely identical to the track it was made from (same color, name, values).
    •  Mac
    •  Windows
    •  Linux


    Remove the track with the yellow highlight.  The two TrackOperationsTest files are what you will use to test the Multi-Track Operations. 

    Multi-Track Operations

    Note: You should have two tracks, one with all even numbers and one will with all odd. If not, see section Saving a Track.

    1. Select the Odd Numbers track, hold shift and select the Even
    numbers
    1. Numbers track (be sure to select the blue odd numbers first).
    2. In the Graph panel, under Operations, under Multi-Graph, select the first option, and
    it go; select
    1. hit Go.
    2. Select the second option and hit
    go
    1. Go
    2. Do this for each operation, and then verify the following points.
     
    1. (The values for each operation are given for the range that is 16 in the original Even Numbers file.
    •  All of the graphs we just created appear blue (like the odd numbers track; which is what we clicked first)
     
    1. )
      1. Even Numbers: 16
     
      1. Odd Numbers: 17
     
      1. Sum: Odd Numbers, Even numbers: 33
     
      1. Diff: Odd Numbers, Even numbers: 1
     
      1. Product: Odd Numbers, Even numbers: 272
     
      1. Ratio: Odd Numbers, Even numbers: 1.0625
     
      1. Mean: Odd Numbers, Even numbers: 16.5
     
      1. Median: Odd Numbers, Even numbers: 16.5
     
      1. Max: Odd Numbers, Even numbers: 17
     
      1. Min: Odd Numbers, Even numbers: 16


    • All values in your IGB session match the expected values defined above.
    •  Mac
    •  Windows
    •  Linux
    • All track names include both input track names in the order they were
    select
    • selected.
    •  Mac
    •  Windows
    •  Linux


     
    1. For some operations, the order matters.  So, now select the Even Numbers track first, hold shift, and select the Odd Numbers track.  Produce the same tracks as above to verify the following:
    •  All tracks are green, like the even numbers track, which was selected first.
      1. Even Numbers: 16
     
      1. Odd Numbers: 17
     
      1. Diff: Even Numbers, Odd Numbers: -1
     
      1. Ratio: Even Numbers, Odd Numbers: 0.94117647


    • All values in your IGB session match the expected values defined above.
    •  Mac
    •  Windows
    •  Linux
    • All track names include both input track names in the order they were
    select.
    • selected.
    •  Mac
    •  Windows
    •  Linux

    Joining and Splitting graphs

     For this test, we will use files from the quickload site
    1. Open the A_thaliana_Jun_2009 genome.
    2. In the Data Access panel, find
    IGB Quickload / Chip
    1.  Chip-Seq / ARR10 PRJNA263839 / graphs 
    Load
    1. Select:
      1. the first one (line a1 BA-treated ChIP rep1 coverage)
      2. the second one (line a1 BA-treated non-IP rep1 coverage)
      3. the seventh one (line a2 non-BA-treated ChIP coverage)
    2. Navigate to: Chr1:8,036,457-8,056,240
    3. Click Load Data.
    4. Arrange them so the green one is on top, then the pink, then the red.
    5. Select them in this order: pink, red, green.
    6. In the
    graph
    1. Graph panel, select Join.
    Verify that:
    •  The three tracks now share a single label feild field called "Joined Graphs".
    •  Mac
    •  Windows
    •  Linux
    • The three tracks are ordered top to bottom: pink, red, green (i.e., the order of the selection).
    •  Mac
    •  Windows
    •  Linux


    Click the little minus button [-]

     in

    in the upper left corner of the joined tracks.

    Image Added

  • Verify that:
  •  pink

    Image Added

    • Pink is the most visible (
    its
    • it's in front), red is the next most visible, and green is in the back
    .
    • (see
    images
    • image above).
    •  Mac
    •  Windows
    •  Linux


    Click the + button to expand them.

    • The top-to-bottom order unchanged.
    •  Mac
    •  Windows
    •  Linux


    Click the shared label area. In the

    graph

    Graph panel, select Split.

     Verify that all tracks are all
    • All tracks are
    now
    • separate again.
    •  Mac
    •  Windows
    •  Linux


    Repeat the above steps using a different selection

    order  verify the the

    order.

    • The order is consistently reflected in how the tracks are stacked together.

    Image Removed

    Image Removed
    •  Mac
    •  Windows
    •  Linux


    To mimick mimic the images exactly (optional):

    1. Go to this region:
     Chr1
    1.  Chr1:8,036,457-8,056,240
    2. In the Graph panel,
    select all
    1. Select All graphs, click the Height knob (no need to actually slide it).
    2. Select the red track and set the Max to 80.
    3. Select the green track only and set the Max to 30.
    4. Select the pink track and set the Max to 120.
     

    Users Guide

     Reviewed the users guide

    Review the relevant Users Guide pages.

    • Each page has accurate information and generally appears up-to-date.

    •  Mac
    •  Windows
    •  Linux