I found these two concepts are very confusing, strand specific vs non strand-specific and paired-end vs single-end.
Actually they point to different stages of RNA sequencing and therefore are completely independent. Strand-specific
library is made during library preparation either by tagging one strand or by degrading one strand. The strand that
are amplified and then sequenced can be either the first cDNA strand or the second cDNA strand, depending on the
protocol. However due to the fact that primer is extended only from 5’ -> 3’, the end that is sequenced first is the
right most end if first cDNA strand synthesis and left most end if second cDNA strand synthesis. Therefore, for the
first strand synthesis the paired end read has to be RF orientation and read from second strand synthesis has be to
FR orientation. For a non strand-specific library RNAseq, it can be both cases.
When I switched from C++ to Python, I found the argument passing was quite a lot easier because you don't need to pre-decided
whether you need the argument is passed by reference or pass by value. However, how on earth does Python handle argument passing? I found
the answer from StackOverFlow.
In a nutshell, it is neither pass-by-value or pass-by-reference. It is call-by-object or call-by-sharing. You might ask "what the
hell does it mean?" To understand this you need to know a fundamental concept in Python
Other Languages
have "variables"; Python has "names". Names live in namespace. When a method is called a local namespace is created. Remember it
will be destroyed after the call. If a method receives a object, it attaches a name to it. Now the object has two names. If the object is
mutable, you may either access to the object by the newly created name and then do some change to the object or you may create a new object and
assign it to this name. In the former situation, the original object is changed. In the latter situation, the original object is intact.
The other way to understand this is illustrated by the highest voted answer. Theoretically this answer is wrong, but practically it is useful.
DAG means Directed Acyclic Graph. This recursive algorithm
finds all paths between two given nodes in DAG. The implementation can be found here, it was written using Python2.7. The Python-like pseudocode is shown here.
#Graph is stored as nodes with two pointers: one points to list of parents nodes #the other points to list of children nodes def findAllPath(graph, visit_set, target): children_nodes = visit[-1].children for each in children_nodes: if each in visit_set: continue if each is target: visit_set.append(each) print visit_set visit_set.pop() break for each in children_nodes: if each in visit_set or each == target: continue visit_set.append(each) findAllPath(graph,visit_set,target) visit_set.pop()