Friday 29 August 2014

C Programming Static Variable

"""
  1. A static variable inside a function keeps its value between invocations.
  2. A static global variable or a function is "seen" only in the file it's declared in. 
"""
Cited from What does “static” mean in a C program?

C Programming Preprocessor

The C Preprocessor

Lines that begins  with a # are called preprocessing directives.

#define LIMIT 100
The identifier LIMIT is called the symbolic constant.

#include <stdio.h>
<> indicates that the file is to be found in the system path. The preprocessor looks for the file only in the system path and not in the current directory.

#include "my_file.h"
The quotes surrounding the name of the file are necessary. A search for the file is made first in the current directory and then in other system-dependent places.




C Programming Naming Conventions


"""The C++ standard library often uses an underscore as a word separator (e.g. out_of_range). Identifiers representing macros are, by convention, written using only upper case letters and underscores (this is related to the convention in many programming languages of using all-upper-case identifiers for constants). Names containing double underscore or beginning with an underscore and a capital letter are reserved for implementation (compiler, standard library) and should not be used (e.g. reserved__ or _Reserved)."""

Cited from Naming convention

C Programming Enumeration Data Type

C Programming Enumeration

Thursday 7 August 2014

Words for thoughts

stumbling blocks
pose a question
in the realm of statistics
in a twist on a similar theme
map nuclear pore architecture

an area of inquiry classically thought of as cell biology
the ability can be applauded
the raison d'être (the reason for existence) of a journal
disseminate developments across disciplines
the size of the modern scientific enterprise is vast

show a method in its best light
paradoxically
rapid developments
may put off potential users from taking the plunge for fear of investing in a new tool that will be obsolete
adopting new approaches

remain resolute in this approach to life
a foolhardy approach to things
the existing panoply of partially correlated and partially overlapping annotations
expanding these methods to genome-scale is arduous
the amounts of raw data produced are prodigious

these misaligned reads and inaccurate quality scores propagate into SNP discovery and genotyping
With the Herculean task of genome sequencing accomplished
some heat shock genes defy the current dogma of transcriptional regulation
expedite analyses

A large number of custom values can quickly make the file opaque to quick inspection
a welter of various genes
Nicola Sturgeon warns scaremongering 'remain' campaigners will squander support
a plethora of Git commands 
bloat the repository

the induction of phenotypic, expression or functional characteristics emblematic of the target cell type
heuristics: a way of ​solving ​problems by ​discovering things yourself and ​learning from ​your own ​experiences
they compare their predictions to cocktails that have previously been reported to enact cell fate changes
generally regulatory networks of multicellular organisms are plagued by both low sensitivity and high false positive rates

Future work will be required to develop new means of overcoming these remaining fundamental barriers to get engineered cells across the finish line.
Pluripotent stem cells can be coaxed to specific lineages through a combination of defined growth conditions and ectopic gene expression.
lack quantitative rigor
the fidelity of cell fate conversions
She has an ​encyclopedic ​knowledge of ​sports trivia.  

The ​museum ​celebrates the trivia of ​everyday ​life.
CellNet is predicated on the discovery of GRNs
Expression repositories have accumulated a wide array of biological perturbations
the performance degrades substantially.

relationships that can be obscured when
merging gene expression profiles from disparate experimental contexts yields high quality biological models
an insoluble amalgam of proteins
I am bullish on the company’s ecommerce segment with a long-term horizon

UK economy stutters in first quarter
Bankruptcy Is Bellwether of New York’s Condo Market
With lenders risk averse 
Attempts by the European Union to stimulate innovation are stifled by bureaucracy.
Britain's property market is on the cusp of a crash.

China looks to rice cookers to pep up economy
ended up hobbling the once highflying economy
Cells become refractory to reprogramming
concurs with our findings
results in bifurcation of a single TAD into two distinct smaller TADs

anomalies
a pronounced shift
the embryo still encased in zona pellucida
attain the stage of independent feeding
obviate the need for

alleviating the need
The reactivation of these genes therefore appears not sufficient to endow cells with development pluripotency.
traditional neural networks require an exorbitant amount of training data
data acquisition technologies
Mention in New York Times clinches sale of Newport home

conferring pluripotency
pluripotent state dissolution
sustenance of this internal regulatory network
MACS compares favorably to existing ChIP-Seq peak-finding algorithms
potentially superior alternative to

poses challenges (or opportunities) in the analysis of data
gives results superior to 
in excess of what is warranted by the sequencing depth
removes all the redundancies
two discernible stages

which the authors dub initiation and maturation
underscores the power of
mechanisms that normally safeguard cell identity
A case in point is the finding that
insurmountable barriers

cells become quiescent
do not join the iPS craze 
premature to coin different terms for processes that we only understand incompletely
What questions will fuel stem cell science over the coming decades?
This conclusion dovetails with parallel work on

pre-RC proteins are assembled during G1 phase and evicted during S phase
provide an ensemble view of
there are two leading strands emanating bidirectionally from origins
making contamination a lingering concern
What has been most disconcerting is that

It should not be insurmountable to
is daunting
must transcend the basic need to
most synchronization schemes are cumbersome
these uncertainties in the gene regulatory milieu

due to incongruencies in their temporal coverage of transcriptional measurements
Is the mitosis–G1 transcriptional spike buffered by post-transcriptional regulation
This issue plagues at least Excel 2008 and 2011
I am sheepish to admitThis is the orphan disease of line ending problems.

That solution does absolutely zilch if you are suffering from naked carriage returns as line endings.
has received high acclaim
the deluge of reads 
since inception in 1994
a factor or histone modification directly bestows a bookmarking function  on an associated gene

Mice lacking GATA1 succumb to anemia due to the failure
to produce mature viable erythroid cells
a significant step in resolving this conundrum
consider the overarching implications
As an orthogonal  approach to
A corollary of the second prediction

Sox2 protein-protein interactions dependent on transcriptional activation  are severely abrogated in mitosis
have a blast on the business side of science
to top it off, this person had to have a PhD
how to handle the backwoods of biotechnology
biotechnoogy companies haven't proven to be flexible about the turf in which they blossom

venting pent-up frustration 
companies will solicit your resume
potential job leads
tap contacts
shelve the book

many Ph.D.s must grovel for academic jobs 
others describe their discomfort with 'schmoozing' with senior professionals in their field
the stories about the academic job search are downbeat
the recruiting and hiring practices of most academic departments seem callous
newly minted college graduates

keep the door open just a crack
riding the next wave into
he is surfing toward tenure
sb's journey from there to the questions that xxx is sprinkled with crumbs of inspiration and a healthy measure of doubt
I managed to glean that much from them

traversed a similar path
splintered job market
unbridled enthusiasm
last winter was a reprieve from shoveling and high fuel bills
Oct4 is perhaps the only obligatory and general regulator of pluripotency

their activity must be promptly reinstated after each  division
preserve their transcriptional status
we report the compendium of genomic locations bound by Esrrb during mitosis
monitored their mitotic behaviour
self-renewal efficiency increases in the presence of LIF and is rescued in its absence 
shows no or labile mitotic binding at other regions

might thereby obfuscate proportionally small but potentially critical inaccuracies in the estimation of expression differences across samples
it is critical to use a plurality of complementary benchmarks
hastening discovery
PHS-funded research runs the gamut from basic research to applied research and product development such as a diagnostic test or drug

make these cultured cells more authentic imitations of their in vivo counterparts
ostentatious wealth
the building has been maligned by some city residents
wipe your mouths; that drooling is unsightly
relish the thought of spending a great deal of time on the effort

gleaming, modern biotechnology palace
one of the most acclaimed young scientist
emerged victorious after
soft-spoken
right at this second

drawn to research opportunities 
elite institutions soon recognized his brilliance
lurking out there somewhere is the Nobel
winnowing a field of 96 dish racks across four categories
suitably enlightened compilers

other ailments
activate a battery of  antioxidant response genes
an exorbitant amount of training data
underscoring the proclivity for TP53 mutations to arise that have the potential to cause cancer
More advanced tinkering may help solve this problem

For a neophyte,...
Without entering the meanders of the program
Both are juxtaposed within TADs
culminating in their aggregation to form chromosome territories
assuage privacy concerns

something figured heavily in someone' work
users inadvertently leave their ID card on their desk
The chromosome territories abut at their borders to create a continuous body of chromatin
eliminate extraneous typing
sth would all be pared back

sb strays from something
the enrichment scoring bias engendered by compositional extremes of some ChIP-Seq datasets
this does not bode as well for
scientists are a resourceful bunch
nor can the solutions be forcibly wed

If a user is able to escalate to root
cause denial of service to the host
a multitude of vectors
the enhancer-gene-specificity conundrum
molecular mechanisms engender specific enhancer-gene interactions within TADs

The incumbent will be responsible for
aesthetically pleasing
clutter listing
portray the outcome of this assignment in
this effect can be achieved with some sleight of hand

the R interpreter chugs along until it gets to the last line of the function
a jobbing programmer just trying to Get Stuff Done
With great fanfare, Sichuan Agricultural University held a ceremony
no one will retire in luxury from this
continue their promising research

The custom of rewarding researchers monetarily for single publications is deeply entrenched at Chinese scientific institutions.
For many, it is an official policy, written in the bylaws.
depend on locally distributed monetary awards as a lifebuoy
the road from bench to publication is long and winding
Information is everywhere, and out there on the world wide web, a lot of it is flippant, irresponsible, and one-sided, to say the least.

balancing the deluge of digital advances, trends, and mandates with the standards and respected traditions of academia is...
Bells and whistles are great for the masses
you need to tread carefully
enhance our primary purpose
it just so happens to fall within an exciting coalescence of events

The focus of this book is unabashedly on hypothesis generation
that’s a false dichotomy
answering our dumb questions
you will home in on a few particularly productive areas
even if the questions are handed to you on a platter

we need to take a little detour to
It’s not foolproof
readr uses a heuristic to figure out
used the pejorative term “messy” to refer to non-tidy data
a block of code elided here

A fib about owners and pointers
metaprogramming is used sparingly
She had an amazing memory and could recall verbatim quite complex conversations.
by-and-large, not that important if you’re only developing packages for yourself
Some stochastic changes will be inconsequential “passengers”; others will confer fitness and be selected as “drivers.”

a vast repertoire of gene expression patterns
Overly restrictive chromatin accentuates epigenetic barriers that prevent cell state transitions
Overly permissive chromatin lowers epigenetic barriers, allowing promiscuous sampling of alternate cell states.
The opposing activities of the H3K27 methyltransferase EZH2 and the H3K4 methyltransferase MLL
many tumors exhibit deranged developmental programs

The overriding premise is that
specific genetic, environmental, and metabolic stimuli disrupt the homeostatic balance of chromatin
may in fact suffice to satisfy every hallmark of cancer
ace a project
scroll through Facebook

how the core complex interacts with auxiliary complex components
thorny questions
She resigned when she was relegated to a desk job
distil some of the available information
the highly acclaimed Rcpp package

but, to be thoroughly pedantic,
Only true R wizards should even consider using this function
discern the programming strategies, idioms, and style of R programmers
I don’t understand all of the R idioms that are common in the advanced R programmers’ conversation, but I am getting some traction.
there is usually a harsh awakening

a burgeoning collection of blogs and Web forums
If there are any stanzas that look mostly the same
the usual "rambling" R script
She spends a lot of time poring over the historical records of the church.
While we’re heaping praise

A digression
A seasoned software developer
a script aficionado
Groovy, obviously, is too flexible to be pigeonholed
All the power of the Java platform is there to be harnessed.

Groovy performs a lot of work behind the scenes to achieve its agility and dynamic nature.
Groovy obediently accepted and executed it
Java is adamant that
Some people may look disparagingly on the text based on the exclusions
Scientific workflows have become the lingua franca of scientific research for orchestrating the execution of processes and tasks.

Universal IRF4 ablation potentiates neointima formation in both mice and rats.
exhibited the opposite phenotype
an effect was abrogated following
the cells continue to divide, piling up into mounds
Charles Babbage's mechanical calculating engines were the antecedents of the modern computer

Most people doing data analysis do this or variations thereof.
an ostensible ‘charity’ position
Heterochromatin was originally discerned cytologically by the intensity of dark staining with DNA dyes
A large fraction of mammalian genomes is taken up by repeat-rich sequences – including tandem-repeat satellites near centromeres and telomeres, retrotransposons, and endogenous  retroviruses - which pose a risk to genome integrity through their potential for illicit recombination and self-duplication.

Seminal work in the 1950s establishe
at long latency (weeks to months)
the primacy of O, S, and K as pioneer factors at enhancers of genes that promote reprogramming
DNA methylation transgressed in pathogenesis
cumulative evidence expounds on the similarities of their function

which in turn necessitates revisiting the existing understanding on DNA methylation maintenance and homeostasis
In a stochastic model, twin forces of methylases and demethylases contend in an equilibrium
resolve the question as to whether
Methyl-CpG-binding domain protein 3 (MBD3) belongs to a family of nuclear proteins in close relation to DNA methylation, but exhibits elusive epigenomic association and functional identity

This corepressor (MBD3) thwarts reprogramming factor activity at sites they already bind.
If we see Mr. Klein's car pull in, we'll give you a heads-up
take the world of biomedical science by storm
through either disruptive or precise genome edits
writing or removing epigenetic marks on DNA and histones

Base editors have increased the efficiency of CRISPR-targeted base substitutions.
facile genome engineering
Watson-Crick base-pairing
singular advances

the field was primed for
viruses are constantly evolving to evade CRISPRmediated attenuation
long diatribes of the million and one reasons why
unload on the person about how stressed-out and frustrated they made you
change your coworker into a paragon of productivity

you can be released from the negative emotional charge around it
if you dread discord
ruminating over what to say
the mental gymnastics of endlessly practicing conversations in your head
the subordinate who keeps underperforming

When the opportunity presents itself to provide unsolicited negative feedback
a less-than-positive performance evaluation
presiding over an unenthusiastic performance review
To keep tensions from blazing
slow your cadence

To steel oneself for the conversation, someone called on someone's years of experience...
Before broaching the subject
a mood-veering, thought-steering, pressure-packed interaction
this analysis paralysis occurs when your brain suddenly becomes overtaxed by worry or pressure
In a contentious moment

It goes unacknowledged or is tersely rejected.
Spoken with composure
gives you the upper hand
a couple other topics worth considering in tandem with this
eliminates oversharing

surprises him with an addition to his wardrobe
perpetually exhausted
sobering, and galvanizing
I usually gorged myself
The value of such breaks is grounded in our physiology

our remaining capacity burns down as the day wears on
While breaks are countercultural in most organizations and counterintuitive for many high achievers, their value is multifaceted
a mental and emotional breather
he found his work increasingly exhausting and dispiriting

is it being in charge that’s most invigorating or participating in a creative endeavor
he instituted a ritual in which
people unintentionally divulge what they stand for
took it upon herself to foster the excitement and commitment of her leadership team
Employees feel increasingly beleaguered

bring all energy wholeheartedly to work
Yet Pozen never comes across as overwhelmed, frazzled, or even all that busy.
completely botched up results
enhancer competence

pluripotency-supporting cytokine leukemia inhibitory factor (LIF)
overt differences
commencement of differentiation 
cessation of transgenic OKSM expression
In this day and age

dwindling ability
employees are jaded
this contemporary malaise 
Her peers weren’t quite as enthralled
unfettered ambition

tell a falsehood
stifle our dreams
a candidate’s scuffed shoes
commitment wanes
Overwork is seductive, because it is still lauded 


assuage our guilt
he'd be contrite
give someone an ultimatum
work may equal drudgery 
menial jobs

something is a grind
abiding enjoyment of daily activities
feel disdained
love founded on caring, concern, and camaraderie
Sheep's milk cheese is the quintessential Corsican cheese

it is prudent to...
It purports to be an exposition of ...
results presented herein
In order to ensure this capability
bleeding-edge releases

When you exchange pleasantries with a co-worker in the elevator
the threatening person wielding a gun
He still wields enormous influence in politics

communication norms included a rough-and-tumble banter
to express dissatisfaction with a colleague’s subpar work 

chastise someone
politics being stigmatized
high potential employees are your proverbial superstars
you don't want to create prima donnas
what you espouse as standards of performance and what actually do

prod someone
blatantly bad behavior
successful careers are predicated on great relationships
Social etiquette dictates that men cannot sit while women are standing
long bouts of locking eyes

you might look for eye aversions
odd fidgeting
innovation often gets a lot of lip service 
unfortunately, lots of people have a myopic view of innovation
your job is to receive that coveted promotion, because you truly earned it.

tooting your own horn
your job is to groom and develop and your employee
budgets are strained (difficult)
I don't want to sound too grandiose
forthright conversation

shuns difficult conversations
Certain people always want to maintain the status quo.
you have to be nimble
someone will have feather ruffled
increase camaraderie

cement the relationship
you went to the same alma mater
a rich vein of conversation
Far too many people neglect this because somehow we've come to associate competence with sternness.
look goofy

I am a big proponent of something
He was still standing on the mountain of evidence he'd accrued.
This scenario is quite tame in comparison to some I've witnessed.
There's usually more animosity
Livid

Nuanced
Mannerism
Torment someone
Mal-intent
My righteousness is shot down by the arrow of hypocrisy.

a brash young engineer
reprimand yourself for not keeping your emotions in check
crying in the workplace is especially fraught for women
narcissist
indigent

that vision came to fruition

Statistics Programming in C

C Programming Language Tips

Gibbs sampler in various languages

Excerpts from "Head First C"

=====
scanf("%79[^\n]", line") 
It means read up to 79 characters, so long as they're not NEWLINES.
=====
For free text input use fgets().

char line[80];
fgets(line, 80, stdin);
printf("Your quote was: %s", line);
===== 
The stack is the section of memory used for local variable storage. Every time you call a function, all of the function's local variables are created on the stack. Variables are added to the stack when you enter a function, and get taken off the stack when you leave.
===== 
The heap is for dynamic memory - pieces of data that get created when the
progeam is running and then hang around a long time.
===== 
The code segment is the part of the memory where the actual assembled code gets loaded.
=====
printf("I like Turtles!"); is the simplified version of fprintf(stdout, "I like Turtles!");
=====
">" redirects the Standard Output. But "2>" redirects the Standard Error.
=====
i % 2 means "The remainder left when you divide by 2".
=====
FILE* in_file = fopen("input.txt", "r");
FILE* out_file = fopen("output.txt", "w");
fprintf(out_file, "Don't wear %s with %s", "red", "green");
fscanf(in_file, "%79[^\n]\n", sentence);
fclose(in_file);
fclose(out_file);
=====
int main(int argc, char* args[])
{
.... Do stuff....
}
The first argument contains the name of the program as it was run by the user.
=====
file accessibility sanity check:

FILE* in;
if (!(in = fopen("dont_exist.txt", "r"))) {
    fprintf(stderr, "Can't open the file.\n");
    return 1;
}
=====
After processing the arguments, the 0th argument will no longer be the program name.
=====
To avoid ambiguity, you can split your main arguments from the options using "--". So you would write "set_temperature -c -- -4". getopts() will stop reading options when it sees the "--", so the rest of the line will be read as simple arguments.
=====
When we tell the compiler about a function it's called a function declaration. C allows you to take that whole set of declarations out of your code and put them in a header file.
=====
When the compiler sees an include line with angle brackets it assumes it will find the header file somewhere off in the directories where the library code lives. But our header file is in the same directory as our .c file. By wrapping the header file name in quotes we are telling the compiler to look for a local file.
=====
What if you want to share variables? Source code files normally contain their own separate variables to prevent a variable in one file affecting a variable in another file with the same name. But if you genuinely want to share variables, you should declare them in your header file and prefix them with the keyword extern.
=====
Every file that make compiles is called a target.
For every target, make needs to be told two things:
  1. The dependencies: which files the target is going to be generated from.
  2. The recipe: the set of instructions it needs to run to generate the file.
Together the dependencies and the recipe form a rule.
=====
All the recipe lines MUST begin with a TAB character. If you just try to indent the recipe lines with spaces, the build won't work.
=====
Make takes away a lot of the pain of compiling files. But if you find that even make is not automatic enough, take a look at a tool called autoconf:
http://www.gnu.org/software/autoconf/. Autoconf is used to generate makefiles.
=====
structtypedef struct {
     int cell_no;
     const char * wallpaper;
     float minutes_of_charge;
} phone;
phone p = {5557879, "s.png", 1.35};








 

Saturday 2 August 2014

Excerpts from the book of "The C programming language"

"A character written between single quotes represents an integer value equal to the numerical value of the character in the machine’s character set. This is called a character constant, although it is just another way to write a small integer."

"Parameter names need not agree. Indeed, parameter names are optional in a function prototype, so for the prototype we could have written int power(int, int);" 

"""One aspect of C functions may be unfamiliar to programmers who are used to some other languages, particulary Fortran. In C, all function arguments are passed ‘‘by value.’’ This means that the called function is given the values of its arguments in temporary variables rather than the originals. This leads to some different properties than are seen with ‘‘call by reference’’ languages like Fortran or with var parameters in Pascal, in which the called routine has access to the original argument, not a local copy."""

"The story is different for arrays. When the name of an array is used as an argument, the value passed to the function is the location or address of the beginning of the array - there is no copying of array elements. By subscripting this value, the function can access and alter any argument of the array."