Help:Editing:Intermediate

From QMRAwiki
Jump to: navigation, search


Indenting

To indent a block of text, use a colon (:) like this:

:Level 1
::Level 2
:::Level 3

Gives:

Level 1
Level 2
Level 3

This is especially useful on discussion pages, where indentation can indicate replies to a particular comment.

Lists

               <!-- Line breaks -->

* Bulleted lists are easy
** more asterisks make more levels
*** and making <br/> new lines does not alter alignment

# numbered lists are easy as well
## numbered lists obey the same rules <br/> as the bulleted lists
### There is a limit to the number of
### levels you can go down

# You can also use numbers and bullets together
#* Thus you can mix and make interesting ordered lists
#* quite easily as well
# and continue numbering

: indenting without bullet or number
:: obeys the same <br/> rules as well
: and uses a different symbol

List will appear as follows

  • Bulleted lists are easy
    • more asterisks make more levels
      • and making
        new lines does not alter alignment
  1. numbered lists are easy as well
    1. numbered lists obey the same rules
      as the bulleted lists
      1. There is a limit to the number of
      2. levels you can go down
  1. You can also use numbers and bullets together
    • Thus you can mix and make interesting ordered lists
    • quite easily as well
  2. and continue numbering
indenting without bullet or number
obeys the same
rules as well
and uses a different symbol

Uploading

An easy way to upload an image is to create a link to your image, even if you haven't uploaded it yet. When you save your page, the name of the image will be red. Clicking on the red link will take you directly to a page that lets you upload your image. There is also an 'Upload file' link in the toolbox on the left. You can simply click Browse and locate the file of interest. If you want, write a brief summary about the image. Once you've located the file, click the Upload File button.

Using Images

Using images in QMRAwiki is done by doing the following: Let's say you want to link to an file (that happens to be an image). To do this, simply type [[File:Icon-hazard.png]] and the image will appear.

Icon-hazard.png

Clicking on the image will take you to that image's page in QMRAwiki.

Let's say though, that you wanted to make the picture smaller and move it to the right of the page. You can do this by adding some wiki code after the file name. For example, |thumb| will decrease the image to 120 pixels wide (a thumbnail). We can follow it with '30px' to make it 30 pixels wide. Writing [[File:Icon-hazard.JPG|thumb|right|30px]] will make the picture go to the right of the page, like this:
Icon-hazard.png

Now, our image is on the right, and we can write on the left.

Image inclusion syntax

To generalize the above: there is a syntax for adding images in Mediawiki wikis. To add an image, use:

[[file:ImageFileName|{type}|{location}|{size}|{caption}]]

{type}, {location}, {size}, and {caption} are all optional. Anything that is not recognizable as {type} {location} or {size} is treated as a caption.

  • type: allowed values are 'thumb', 'thumbnail' or 'frame'. If this is left blank, there is no box around the image, and it doesn't display a caption
  • location: allowed values are 'right', 'left', 'center' or 'none'. Text will wrap around 'left' or 'right' but not around 'center'. Use {{Clr}} to prevent text below from wrapping.
  • size:{width}px width in pixels. Ignored if type is 'frame'.

Examples

In the examples below, the image is placed at the beginning of a block of nonsense text, so you can see how wrapping around the image works.

Simple Image

[[File:Icon-hazard.png]]

Icon-hazard.pngLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

Simple Image Resized

[[File:Icon-hazard.png|150px]]

Icon-hazard.pngLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

Framed Images with caption

Default alignment: [[File:Icon-hazard.png|frame|Sample image figure legend]]

Sample image figure legend
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

Centered: [[File:Icon-hazard.png|frame|50px|center| Sample image figure legend]]

Sample image figure legend
Note that size is ignored when frame is set. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

See also

More about Images at meta and at Wikipedia. Embedded images on QMRAWiki must be uploaded, and then linked. To upload, go to Upload file from the toolbox. The most recently uploaded images and files are listed in Special:Newimages.

Tables

How to format tables in QMRAwiki

<!-- For tables this is the border arrangment that we use all of the | symbols need to line up -->
<!-- {| starts the table   || defines new columns  |- defines that a new row is starting or the other one is finsihing -->
<!-- |} closes the table

{|                                                    <!-- These top 3 lines will not change other than renaming the caption -->
{| border = "1"
|+ '''Table Caption'''                                <!-- for a link use  [http://link.to.file.uploaded.xls '''Table caption''' -->
! Column A 
! Column B					      <!-- Headers are defined thusly and are automatically bolded and centered -->
|-
| A1                                                  <!-- Two ways to define cell entries -->
| B1
|-
| ''A2'' || '''''B2'''''
|-
| text or numbers go in (1,2,3,4,5) || rows adapt size to fit values <br/> starting a new line is easy too
|-
| colspan = "2" align="center"| merged columns
|-
| colspan = "2" align="right"| Right alignment
|-
| colspan = "2" | left alignment
|-
| rowspan = "2" | merged rows
| only for that column
|-
| Thus this column is normal
|-
| And you can add Greek letters || <center> α Α δ Δ </center>
|}

Table will appear as follows


Table Caption
Column A Column B
A1 B1
A2 B2
text or numbers go in (1,2,3,4,5) rows adapt size to fit values
starting a new line is easy too
merged columns
Right alignment
left alignment
merged rows only for that column
Thus this column is normal
And you can add Greek letters
α Α δ Δ

There are several templates[1] on this wiki that are used to format content, particularly relating to dose response. We have code (written in R) for fitting dose response models; that code outputs appropriate template calls that can be pasted directly into QMRAwiki pages. If a template is changed, the R code must also be changed to avoid errors. All of these templates use named fields (rather than numbered fields). Text that is capitalized must be modified by a human when the template call is pasted into QMRAwiki; it represents necessary information that the R code cannot automatically add.

If you are editing templates, some templates have embedded Semantic Internal Objects, which occur at the end of the template. All text within {{#set_internal|...}} can (and should) be ignored when modifying the template.

When adding a new dose response model page please also add a category tag for the Agent. Use a preexisting one from the subcategory tree if possible. If the agent you wish to add does not exist you may create a new category. Please also tag the page associated with the new category you just created with one of the higher level tags found here.

Presenting data from feeding experiments

Template:DRExperimentDataTable3 formats data from dose response experiments with 3 dose levels. It is actually a family of templates: there are similar templates for each possible number of dose levels (Template:DRExperimentDataTable4, Template:DRExperimentDataTable5, etc.). For example, this code:

{{DRExperimentDataTable3|title=''Ornythorchis sumiomis'' fed to gerbils|refer=Eco 1990|reference=Eco U, 1990. Death in gerbils, mediated by ''O. sumiomis''. ''Journal of Irreproducible Results'' '''24'''(3):123.|pos=death|neg=undeath|d1=10|p1=3|n1=0|t1=3|d2=5|p2=2|n2=1|t2=3|d3=1|p3=1|n3=2|t3=3}} <references/>

yields this formatted output (the detailed formatting info is contained within Template:DRExperimentDataTable3):


Ornythorchis sumiomis fed to gerbils [1]
Dose death undeath Total
10 3 0 3
5 2 1 3
1 1 2 3
  1. Eco U, 1990. Death in gerbils, mediated by O. sumiomis. Journal of Irreproducible Results 24(3):123.

Note that italics (for proper display of scientific names, etc.) must be added manually, like this: ''Italicized text''

This family of templates incorporates citations. It can correctly handle repeated citations, i.e., when two different tables cite the same reference. To do this, the 'refer' field is the short reference name (e.g., Smith 2003), and the 'reference' field is the full reference that you want in the bibliography (e.g., Smith J, 2003. Bacilli I have known, JAMA, 1023(4):2023.). See the Mediawiki Cite extension [2].

Presenting results from fitting dose response models to data from feeding experiments

Template:DRFit presents results from fitting feeding experiment data to the exponential and beta-Poisson dose response models, including an assessment of which model is preferred for those data.

Goodness of fit and model selection
Model Deviance Δ Degrees
of freedom
χ20.95,1
p-value
χ20.95,m-k
p-value
Exponential 2.99 2.98 2 3.84
0.0845
5.99
0.224
Beta Poisson 0.0156 1 3.84
0.901
Exponential is preferred to beta-Poisson; cannot reject good fit for exponential.

Presenting detailed results for a particular model

Template:DRConfidenceExponential presents bootstrapped parameter estimates for the exponential dose response model.

Optimized k parameter for the exponential model, from 500 bootstrap iterations
Parameter MLE estimate Percentiles
0.5% 2.5% 5% 95% 97.5% 99.5%
k 1.22E-08 4.44E-14 2.19E-09 4.40E-09 1.17E-07 1.17E-07 4.03E-07
ID50/LD50/ETC* 5.7E+07 1.72E+06 5.92E+06 5.92E+06 1.58E+08 3.17E+08 2.82E+17
*Not a parameter of the exponential model; however, it facilitates comparison with other models.

Template:DRConfidenceBetaPoisson is very similar; it presents bootstrapped parameter estimates for the beta-Poisson dose response model.

Optimized parameters for the beta-Poisson model, from 500 bootstrap iterations
Parameter MLE estimate Percentiles
0.5% 2.5% 5% 95% 97.5% 99.5%
α 2.13E-01 1.26E-03 3.22E-02 3.82E-02 3.62E+02 1.25E+03 1.25E+03
N50 3.41E+07 2.78E+06 3.47E+06 5.92E+06 1.17E+12 1.01E+14 9.22E+140

Briefly presenting results for several models together in one table

There are a set of templates which are combined to format summary tables of dose response models. Template:DRSummaryTableStart provides the table headings. Template:DRSummaryTablePreferredModel should be called immediately afterwards, and provides the preferred model for a particular agent. It is followed by any number of calls to Template:DRSummaryTableNonpreferredModel, describing other available dose response models for that agent. The table is completed by a call to Template:DRSummaryTableEnd, which has no arguments and adds the final footnote row.

{{DRSummaryTableStart|agent=''Bacillus necromancicum''}}

{{DRSummaryTablePreferredModel|expID=99|refer=Torgerson 2011|reference=Torgerson JL, Hobart IV, (2011) Journal of Postmortem Studies, 34 (13) 1365-1367.|host=zombies, Lugubrious strain|agentStrain=Voldemort Q|route=injected|nDoses=4|doseUnits=CFU|response=reanimation|bestFitModel=exponential|parameters=k = 0.02|N50=37}} {{DRSummaryTableNonpreferredModel|expID=101|refer=Umberto 2012|reference=Umberto UU, Oxnard QT, Rehoboth ILB (2012) Journal of Non-Mundane Behavior, 34 (13), 1365-1563.|host=zombies, strain I56/8|agentStrain=Voldemort A|route=injected|nDoses=6|doseUnits=CFU|response=reanimation|bestFitModel=beta-Poisson|parameters=α = 0.1, N<sub>50</sub> = 100|N50=100}} {{DRSummaryTableEnd}} <references/>


Experiment serial number Reference Host type Agent strain Route # of doses Dose units Response Best fit model Optimized parameter(s) LD50/ID50
99* [1] zombies, Lugubrious strain Voldemort Q injected 4 CFU reanimation exponential k = 0.02 37
101 [2] zombies, strain I56/8 Voldemort A injected 6 CFU reanimation beta-Poisson α = 0.1, N50 = 100 100
*This model is preferred in most circumstances. However, consider all available models to decide which one is most appropriate for your analysis.
  1. Torgerson JL, Hobart IV, (2011) Journal of Postmortem Studies, 34 (13) 1365-1367.
  2. Umberto UU, Oxnard QT, Rehoboth ILB (2012) Journal of Non-Mundane Behavior, 34 (13), 1365-1563.

Templates

Including content from one page into another.

More Info

  • Basic Editing tutorial - Just enough to get started: Entering Edit mode for existing pages, creating new pages, adding Links, basic formatting (italic,bold,bold-italic), Subheadings, Categories
  • Intermediate Editing tutorial (all on one page) - For users who want more control over appearance: Indenting, Lists, Image and table basics. Basic templates, Including content from one page into another. Individual tutorials:
    • Lists
    • Images
    • Tables
    • Citations/referencing [3]
    • Templates - includes how to include content from another file, as either an editable or noneditable copy
  • Advanced Editing tutorial - Advanced topics: for those who will be building templates, and those who just want to know what else can be done