As a scientist, the onus lies on you: to be your own critic, to check your work backwards and forwards before you report it to the community; because your word (when properly supported, of course) will be taken at face value. There is no policing at the level of coming into your lab and checking if you really mixed tube A with tube B and got C: if you say so and you have supporting data, it will be accepted after critical evaluation, which may not necessarily catch that you in fact mis-labeled tube A as tube B instead. Which is why one repeats experiments and adheres to an absolute code of conduct. It is also why I believe there should be some level of internal policing in labs: not because of lack of trust, but to ensure that one did not, as an honest mistake, mis-label and report erroneous results. Sometimes it takes a third eye to catch that. It would be ideal if all the raw data was examined by someone other than yourself. But ideal is far from real: real world has deadlines, busy everybody, races to publish before competition, and little need to show raw data.
That said, I think most of us have made mistakes at some time or the other. What happens then? I remember two occasions in my grad-school life where I committed big mistakes but luckily caught them in the nick of time.
The first incident was when I was collaborating with another prof on his work. He approached me at a meeting and discussed some data with me that he wanted me to look at, with the carrot of authorship attached. I thought I did a thorough job but a small human error crept in somewhere and slipped through the cracks. My own advisor (lets call her PhdAdv) had no role to play in this collaboration, hence was not even looking over my shoulder. Collaborator already considered me the "Expert", so took whatever I said without questioning. Figures were made and the paper was ready to go out the door. Collaborator had heaped lots of praise on me for my hard work and sent me the final version of the manuscript to go over. Thats when I discovered that I had made a huge mistake. (Literally mis-labeled file A as file B and run the analyses accordingly). I was mortified. The very thought that I had "almost" published something wrong was killing. Then, there was the issue of admitting to such a careless, avoidable mistake. This "wrong" analysis of mine gave rise to two big figures in the paper, that Collaborator's grad student really needed to graduate. Morever, I really liked Collaborator. I had dreams of doing a post-doc with him. This was a very early stage in my grad school and I could see my whole reputation being tarnished right there. I felt like shit.
I wrote to Collaborator about it, profusely apologizing backwards and forwards. He wrote me back the nicest email ever. First, appreciated the fact that I had caught it and owned up. Second, told me clearly that I should re-do the analyses, but if I didn't find anything interesting my section would be taken out and I would of course, have to forgo authorship. Third, that this incident did not change his impression of me at all and that he looked forward to collaborate on future projects with me. I re-did the analyses, the new pictures were not as pretty but still went on the paper. We collaborated again a couple years later and he had a standing offer of a position in his lab for me when I was close to graduating. I ended up not going but that's a whole other story.
The second time round, the mistake I made was again at a critical point. This time I had come up with a very nifty script to analyse my data. Or so I thought. Of course I subjected the script to lots of tests and it passed all of them. I even had my programmer lab-mate look over my script, and she okayed it. I was feeling very good about myself and put all my data sets through the script and generated tons of numbers. More analysis later, I came up with a result that looked like this
It was beautiful! An additional piece of data that fitted my hypothesis. And it was done two days before I was going out of the country to give my first ever talk at an international meeting. I showed it to PhdAdv and she was very kicked. She asked me if I had double-checked my script, and I showed her the test runs and their results. I was super-excited. She was satisfied. We incorporated the figure in my talk: it was really the crowning glory to my talk. That day I gave a practice talk to the lab, stayed back late finishing up experiments and went home close to midnight. It also happened to be the night Candy died on me, right in the middle of the road. It was way past mid night by the time I reached home after getting the car towed and everything. I sat staring at my data, and suddenly a small doubt occurred to me. I ran my script through some more tests. It failed them. I emailed the script to my programmer friends, explaining to them what it intended to do. S wrote me back right away "is mein bug hain". My world came crashing on to me. And now, I had to tell PhdAdv about it! It was literally my worst nightmare come true. I stayed up that night and redid the analyses after S had fixed my code. The new, correct picture looked like this
Not so beautiful any more. In fact not anything. I called up PhdAdv first thing in the morning. She was of course, angry. "I asked you if you had double-checked your script" she said. We discussed the new results, cross-checked before including them, deleted the old slide and toned down the whole presentation. PhdAdv made me give one more practice talk, whipping me into shape and restoring my confidence. I got on my flight. Gave my talk at the meeting. It was a super-hit. I got one nasty questioner, a huge debate followed and I could see all the big wigs in my field jump to my defense to shut up the obnoxious guy. I held my own too. The debate and discussion over my talk overflowed at the post-session coffee time. Nobody had to know that I had goofed up and almost presented a wrong result. I may not have had the most overwhelming or mind-blowing results then, but my methods and findings still showed a lot of promise that went down very well with the audience. I shudder to think what would have happened if I had shown the wrong figure, woo-ed the audience, only to realise later that i had actually made a big mistake and produced misleading results.
Yes, I learned my lessons to be careful, that one can never be too sure while cross checking, running controls, repeating experiments, duplicating results. It is very critical in science. The temptation to see what you want to see looms large and can sometimes unknowingly mar your view. Haste is also not a good idea: its important to put time and distance between yourself and your data so you can look at it objectively. But the most important thing of all, is that if you do screw up, to never be afraid to own up, no matter at what stage you discover your mistake. You owe it to the scientific community to correct yourself: to convey the right information and prevent others from wasting their time trying to reproduce your work. And in spite of the deep sense of shame and drop in confidence that overwhelms you when you first discover your mistake, you will sleep well at night after making repairs.