In molecular biology and genetics, upstream and downstream both refer to relative positions of genetic code in DNA or RNA.
By convention, upstream and downstream relate to the 5' to 3' direction respectively in which RNA transcription takes place.
Some genes on the same DNA molecule may be transcribed in opposite directions.
This means the upstream and downstream areas of the molecule may change depending on which gene is used as the reference.
The terms upstream and downstream are sometimes also applied to a polypeptide sequence, where upstream refers to a region N-terminal and downstream to residues C-terminal of a reference point.