Tuesday, March 8, 2022

Karma Yoga: The Yog of Action

Chapter 3: With 43 verses or shlokas, the third chapter is similar in length to the first chapter. Having finished 3 chapters, we will be using the "The Holy Geeta"  Commentary by Swami Chinmayananda as supplementary reading material. This version of the Gita is published by the Chinmaya Mission.

  • Arjuna (Shloka 1-2;36): 3 sholkas
  • Krishna, the Supreme Personality of Godhead (Shloka 3-35;37-43): 40 shlokas

Brief Summary: In this chapter, Arjuna asks the Lord why he is being asked to fight this horrible war if the path of knowledge is better than action. Arjuna asks the Lord to clarify which is the path to the greatest good and dispel the confusion created in chapter-2. The rest of the chapter explains action and its practice. 

First, Lord Krishna explains that in this world, two paths exist. One is the path of knowledge and the other is the path of action. Mere renunciation or abstinence from work does not lead one to freedom from action. Restraining the senses while the mind wanders the material world is hypocrisy. On the other hand, controlling the mind and engaging in work without attachment is the superior path. Performing the duties that are assigned to you is better than inaction. All work binds you to the world, except that which is done as Yajna or sacrifice. 

All living entities depend on food for sustenance. Food is the result of rains that occur due to the performance of Yajna or sacrifice. This sacrifice is a result of duties prescribed by the Vedas. Similarly, the lord also has to perform certain actions without which the world would be destroyed. The shloka 30 focuses on the total surrender of our desires to Krishna with no expectations of profit or ownership. By performing duties with no attachment to the results, one becomes free from bondage.

Shlokas 33 and 34 give an overview of the conscious (both controllable and uncontrollable) and subconscious (uncontrollable)  mind. It can be described at 3 levels, Samskara, raga/dvesha, and karma. The samskara is from the subconscious level and is beyond our control. Similarly, Karma despite being in the conscious is uncontrollable as we become conscious of it only after it has taken place. For example, we can regret an action/emotion after it has passed. However, it would be too late by then to control it. The secret gap between the layers of Samskara and karma is the raga/dvesha which is controllable and conscious. Raga/dvesha refers to our likes/dislikes which are the foundation of our actions. Katha Upanishad mentions that in every stage of our life, we make decisions based on Shreyas and preyas. Shreyas is a consequence that produces lasting benefit and Preyas provides immediate pleasure.

You can see this video in which Swami Sarvapriyananda explains this in detail.

Arjuna asks an interesting question in the 36th verse, why does one feel compelled to perform sinful acts against their will? 

The lord explains that this is merely lust that gets transformed to wrath upon contact with the material world. Only by overcoming lust (which happens to be a formidable enemy) can one know that the soul is superior to the intellect. 

 i.e., Body< Senses< Mind< Intellect< Soul 


Favorite Shlokas:

Shloka 14:
annad bhavanti bhutani

parjanyad anna-sambhavah

yajnad bhavati parjanyo

yajnah karma-samudbhavah

Shloka 27:

prakrteh kriyamanani
gunaih karmani sarvasah
ahankara-vimudhatma
kartaham iti manyate

Shloka 38

dhūmenāvriyate vahnir yathādarśho malena cha
yatholbenāvṛito garbhas tathā tenedam āvṛitam



Saturday, February 5, 2022

Sānkhya Yoga: The Yog of Analytical Knowledge

Disclaimer: All details are with regards to the book Bhagavad Gita As it is by his divine grace A.C. Bhaktivedanta Swami Prabhupada founder-Acarya of the International Society for Krishna Consciousness.  However, the summary, views expressed and errors in the interpretation and understanding are the authors' own opinions. The goal of this write-up is to serve as class notes for the author in the upcoming exams.

Chapter 2: With 72 shlokas the second chapter "Sānkhya Yoga" is the second-longest chapter and is considered to present the gist of the entire Bhagavad Gita. The chapter is simply referred to as "Contents of the Gita Summarized" in the version of as-it-is. The use of the heading "Sankhya" leads to speculation about its link to the Sankhya philosophy. 

  • Sanjaya (Shloka 1; 9-10): 3 shlokas
  • Arjuna (Shloka 4-8; 54): 6 sholkas
  • Krishna, the Supreme Personality of Godhead (Shloka 2-3;11-53; 55-72): 63 shlokas

Brief Summary: In this chapter, Lord Krishna answers the questions raised by Arjuna in chapter-1 and tries to convince him that fighting the war by overcoming his apprehensions is the correct path. Arjun completely surrenders to his friend and accepts Krishna as his mentor seeking his guidance. The lord justifies the killing of the kuru army by explaining the eternity of the soul and the need for compliance with one's duty. Lord Krishna preaches that one's mind should remain steady irrespective of the favorable or adverse circumstances. As the seasons change in nature in the same way perception of our circumstances changes throughout our life. The wise man is not bewildered by such changes (happiness or distress, loss or gain, victory or defeat, death) and remains unfazed. According to Vedanta, such a person of a steady mind is eligible for liberation (i.e., attainment of moksha or escape from the cycle of birth and death).

In this chapter, the shlokas can be categorized under Karma yoga (duty), Gyan yoga (knowledge), and Bhakti yoga (surrender). These three aspects of yoga are further explained in greater detail in subsequent chapters. 

1) The eternity of the soul has been described in several shlokas in different ways to drive home the main message.  For example, 
  • Change of clothes==change of the body for the soul
  • Young age, old age, and death for the body ---> In the same way the soul also changes the body

 2) In order to attain liberation

  • One should not be indulged in sense pleasures (desires).
  • Keep the mind free from attachment, fear, anger, and lust.
  • Not be disturbed by the incessant flow of desires.
  • Be always involved in devotional service of the lord

3) Guidance on the performance of duties 
  • Action without expectation of results. This chapter contains the most popular shloka of the Bhagavad Gita which every Indian has probably heard either through movies or everyday proclamations states that "One should perform their duties diligently with detachment and not focusing on the results of their actions". (Shloka 47)
  • The shloka 48 states that one should perform his/her duties equipoise abandoning all attachment to success or failure. Such equanimity is described as yoga in the scriptures.
  • The various characteristics of a person with a steady mind are described at the end of chapter-2.
Salient observations:
  1. In Shloka 23, it is given that the soul is eternal. It can not be destroyed by weapons, fire, water, or wind.
  2. In Shloka 58, the tortoise withdrawing its limbs into its shell is compared to a person withdrawing his senses from the material world.
  3. Shloka 48 states that one can perform his duties with a balanced state of mind irrespective of attachment with success and failure. (Yoga definition).
Favorite Shlokas:

Shloka 13:

dehino 'smin yathä dehe
kaumäraà yauvanaà jarä
tathä dehäntara-präptir
dhéras tatra na muhyati

Shloka 47:
karmaṇy-evādhikāras te mā phaleṣhu kadāchana
mā karma-phala-hetur bhūr mā te saṅgo ’stvakarmaṇi

Shloka 63:
krodhād bhavati sammohaḥ sammohāt smṛiti-vibhramaḥ
smṛiti-bhranśhād buddhi-nāśho buddhi-nāśhāt praṇaśhyati


Shloka 70:
āpūryamāṇam achala-pratiṣhṭhaṁ
samudram āpaḥ praviśhanti yadvat
tadvat kāmā yaṁ praviśhanti sarve
sa śhāntim āpnoti na kāma-kāmī

 

Saturday, January 29, 2022

Arjuna's Vishada Yoga: Prince Arjuna's anguish

Disclaimer: All details are with regards to the book Bhagavad Gita As it is by his divine grace A.C. Bhaktivedanta Swami Prabhupada founder-Acarya of the International Society for Krishna Consciousness.  However, the summary, views expressed and errors in the interpretation and understanding are the authors' own opinions. The goal of this write-up is to serve as class notes for the author in the upcoming exams.

Chapter 1: With 46 shlokas (in contrast to 47 in other versions), the first chapter "Arjuna's Vishada Yoga" is of intermediate length and sets the stage for the chapters that follow. 

  • Dhritrashtra (Shloka 1): 1 sholka
  • Sanjaya (Shloka 2-20; 24-27; 46): 24 shlokas
  • Arjuna (Shloka 21-23; 28-45): 21 sholkas

Brief Summary: In this chapter, the Kurukshetra battlefield is described by Sanjaya, (the counselor of king Dhritrashtra) in response to the request of the blind king Dhritrashtra. With the help of the special power given to Sanjaya by his guru Vyasa, he was able to envision the battlefield from Dhritrashtra's room. This chapter deals with the apprehensions of the Pandava prince Arjuna in waging a war against his cousins the Kauravas despite his proficiency as a warrior (being a Kshatriya). Sometimes we are also very indecisive and are not wanting to take up new challenges despite being skilled and capable. Our mind has a tendency to underestimate our abilities and comes up with numerous reasons for not performing a particular task. The mind tends to remain in its comfort zone. This chapter highlights this aspect of the human mind. 

Salient observations:

  1. The warriors on the side of the Pandavas included Yuyudhana (i.e., Satyaki), Virata, Drupada (i.e., Yajnasena), Dhristaketu, Chekitana, and the King of Kashi, Purujit, Kuntibhoja, Saibya, Yudhamanyu, Uttamauja, sons of Draupadi and the son of Subhadra with Bhima as their General. (Shlokas 4-6)
  2. With Bhishma as their General, the Kauravas had great warriors like Drona, Karna, Kripa, Ashwathama, Vikarna, and son of Somadatta (i.e., Bhurishrava). (Shloka 8)
  3. The battle cry signifying the beginning of the war is characterized by the blowing of various musical instruments which was started by Bhishma. The description of conch shells blown by various warriors is given in detail with conch shell names of the 5 Pandava princes and Lord Krishna (Lord Krishna: Panchajanya; Arjuna: Devadatta; Bhima: Paundra; King Yudhisthira: Anantavijaya; Nakula: Sughosa; Sahadeva: Manipushaka). (Shlokas 12-19)
  4. In Shloka 12 it is mentioned that Bheeshma roared like a lion. In Shloka 14 it is described that Arjuna's chariots were drawn by white horses. 
  5. Having seen the combatants in both the armies prince Arjuna refuses to fight and provides the following reasons for his refusal (this observation is inspired by writings of DiscoverSuperSoul):

D: Discontentment (inability to enjoy victory): Shlokas 32-35 

I: Indecision: (confusion regarding the correct path): Sholkas from chapter 2

C: Compassion (attachment towards his own kinsmen): Shloka 31

E: End of the dynasty (and the consequences thereof): Shlokas 39-43

F: Fear of accruing sin (karmic consequences of sin): Shlokas 36-38
          
We provide the mnemonic of DICE-F (remember as DICE Failure) to remember the reasons given by Arjuna. The entire war is the consequence of gambling with dice and Yudhiṣṭhira's failure.

Favorite Shlokas:

Sholka 10:

aparyaptam tad asmakam balam bhismabhiraksitam

paryaptam tv idam etesam balam bhimabhiraksitam


Sholkas 28-29:

drstvemam sva-janam krsna yuyutsum samupasthitam
sidanti mama gatrani mukham ca parisusyati

vepathus ca sarire me roma-harsas ca jayate
gandivam sramsate hastat tvak caiva paridahyate

Sholka 44:


aho bata mahat papam kartum vyavasita vayam
yad rajya-sukha-lobhena hantum sva-janam udyatah


Our Doubts:

  1. Why are the conch shells described in such great detail? What is the significance of these sounds?
  2. Should one perform his duties diligently even if it is going to cause suffering for others?

Names of Arjuna and Krishna:

Arjuna:

  1. Gudakesha
  2. Partha
  3. Kaunteya
  4. Dhananjaya
  5. Kapi-dhvajah

Krishna:

  1. Hrishikesha
  2. Madhava
  3. Janardhana
  4. Varshneya
  5. Achyuta
  6. Keshava
  7. Madhusudhana


Tuesday, January 25, 2022

Bhagwad Geeta in numbers - a speculative commentary

The data in this table is compiled from the resources available online and corresponds to the version of the Bhagwad Geeta that has 700 shlokas/slokas.
ChapterTitleTotalKrishnaArjunaSanjayaDhritrashtraPercentage_by_chapterCumulative percentage
1Arjuna_s_Vishada_Yoga470212516.716.71
2Sankhya_Yoga726363010.2917.00
3Karma_Yoga43403006.1423.14
4Jnana-Karma-Sanyasa_Yoga42411006.0029.14
5Karma-Sanyasa_Yoga29281004.1433.29
6Atma-Samyama_Yoga47425006.7140.00
7Jnana-Vijnana_Yoga30300004.2944.29
8Aksara-ParaBrahma_Yoga28262004.0048.29
9Raja-Vidya-Raja-Guhya_Yoga34340004.8653.14
10Vibhuti_Yoga42277806.0059.14
11Viswarupa-Darsana_Yoga552233007.8667.00
12Bhakti_Yoga20191002.8669.86
13Ksetra-Ksetrajna-Vibhaga_Yoga34340004.8674.71
14Gunatraya-Vibhaga_Yoga27261003.8678.57
15Purushottama_Yoga20200002.8681.43
16Daivasura-Sampad-Vibhaga_Yoga24240003.4384.86
17Shraddhatraya-Vibhaga_Yoga28271004.0088.86
18Moksha-Sanyasa_Yoga787125011.14100.00
TotalBhagwad_Geeta70057484411  
 Percentage_by_character 82.0012.005.860.14 

The table given above provides the count of slokas in each of the chapters of Bhagwad Geeta. Details of the number of slokas are further separated by the characters attributed to these slokas. In addition to the actual numbers, the values are also summarised as sums, percentages, and cumulative percentages to help with the speculative commentary given below.

Commentary:

  1. The Bhagwad Geeta has been described as "a dialogue between Pandava prince Arjuna and his guide and charioteer Krishna, the Supreme Personality of Godhead". However, these numbers help highlight the fact that in addition to Krishna and Arjuna, the text contains two more characters (i.e., Sanjaya and Dhritrashtra).
  2. It should be noted that Dhritrashtra appears only in the first chapter. The first shloka of the first chapter to be precise. Although his counselor Sanjaya appears in four chapters (the first two, chapter 10, and the last chapter), the actual number of shlokas attributed to the kuru king Dhritrashtra is only 1. It looks almost as if the character of Dhritrashtra was forgotten. Even the sporadic appearance of Sanjaya at the beginning middle and end seems a bit surprising. Is it possible that these two characters were added to the Bhagwad Geeta at a later date?
  3. Although the Bhagwad Geeta is considered a "dialogue", the percentage of shlokas attributed to each character shows that the bulk of the shlokas (82%) is coming from the lord Krishna and only 12% is from Arjuna. Even Sanjaya with his observer status has almost 6% of slokas. In fact, five chapters (i.e., 7, 9, 13, 15, and 16) are monologues with only the lord Bhagavan Krishna speaking. Even the other chapters are strongly skewed with the lord Bagvan Krishna speaking more than 90% of the time in eight chapters (i.e., 3, 4, 5, 8, 12, 14, 17, and 18) and more than 85% in another two chapters (i.e., 2 and 6). Only chapters 10 and 11 seem more balanced with the lord contributing ~64% and 40% respectively. Chapter-1 again stands out with 0% contribution from the supreme personality of godhead.
  4. Half the shlokas are completed by the time we reach the 9th of the 18 chapters. Overall, the content is rather evenly distributed across the 18 chapters with the exception of chapters 2 and 18 which contribute more than 10% each. 

Several luminaries have written commentaries or Bhashya's on the interpretation of the Gita. Apparently writing a commentary on the god's song was considered a requirement for scholastic advance in the ancient world. However, it is unclear to me how many of these commentaries were written without anticipation of results.


Monday, November 8, 2021

Scattering of genes from evolutionary breakpoint region due to chromosomal rearrangements

Lemaitre et al., (2009) define Evolutionary Breakpoint Regions (EBRs) as those genomic regions that have undergone at least one structural change that results in an altered karyotype between lineages. Characteristic features of EBRs have been analyzed using large-scale datasets to identify the prevalence of repeat regions, GC features, and epigenetic attributes associated with EBRs. Most changes in the gene order occur due to the chromosomal rearrangements that occur at the EBR loci. In addition to these changes in gene order, it has been proposed that gene loss can occur at these loci. For instance, the loss of approximately ~2000 genes is thought to have occurred in the ancestor of all birds. A vast majority of these gene loss events are proposed to coincide with EBRs. However, the challenges involved in sequencing and assembling the EBR regions have made it challenging to verify the validity of these claims. 

Similar to birds, the evolution of EBRs in rodent genomes has proved difficult to analyze and interpret. A recent study by Shinde et al. explores the EBR corresponding to the human chr7p13 in rodents and marsupials by a careful comparison of gene orders in several closely related species. Interestingly, they find that the same region has undergone rearrangement in both rodents and marsupials. However, the result of the rearrangement is slightly different in the two groups. While in rodents, both the STK17A and COA1/MITRAC15 genes are likely lost, the STK17A gene is retained after the rearrangement in marsupial species. 

The study is not entirely focused on the EBR though. Shinde et al. investigate the evolutionary history of the COA1 gene in various vertebrate species, more than 300 by their count. Recurrent loss of this gene is noted in galliform birds, several rodent species, and cheetah. Functional studies have implicated a role for COA1/MITRAC15 in promoting mitochondrial translation and complex I and IV biogenesis (Wang et al., 2020). Although COA1/MITRAC15 gene is widely conserved among vertebrate species, knockout studies exhibit a mild effect on function and can easily be compensated by overexpression of other genes (Pierrel et al., 2007; Hess et al., 2009). However, the prevalence of positive selection in primates suggests that the COA1/MITRAC15 can contribute to adaptation in the OXPHOS pathway (Van Der Lee et al., 2017). The loss of this gene following relaxed selection in the cheetah, Galliform birds, and several rodent species provides an example of gene dispensability in the OXPHOS pathway.

Salient features:

1.     Verification of the base-pair level changes leading to gene loss utilizes genome sequencing reads and transcriptomes.

2.   Several precautions based on the 5-step procedure proposed recently by Sharma et al., 2020 ensure gene loss validity.

3.     The timing of gene loss is estimated based on the widely used method proposed by Meredith et al. (Meredith et al., 2009). Signatures of relaxed selection characterized using the latest methods implemented in the HyPhy package and the models available in codeml.

4.    The role of evolutionary breakpoint regions (EBR) in gene loss is explored by investigating gene loss across multiple rodent species. Genomic regions that have translocated to different chromosomes after the rearrangement are studied in detail by comparing several pre-CR and post-CR species.

Novelty:

  1. This study is probably the first report documenting the loss of a known oncogene in birds and might help understand the lower prevalence of cancer in birds than mammals.
  2. Shinde et al., identify the origin of novel isoforms of COA1/MITRAC15 in Carnivore species through alternative splicing.

After two rounds of review, this manuscript is finally published in the journal Scientific Reports with the title "Recurrent erosion of COA1/MITRAC15 exemplifies conditional gene dispensability in oxidative phosphorylation". For any press releases or promotions, please note that the correct citation of the journal is “Scientific Reports” not “Nature Scientific Reports”.

References

 Hess, D. C. et al. (2009) ‘Computationally Driven, Quantitative Experiments Discover Genes Required for Mitochondrial Biogenesis’, PLoS Genetics. Edited by S. K. Kim, 5(3), p. e1000407. doi: 10.1371/journal.pgen.1000407.

Van Der Lee, R. et al. (2017) ‘Genome-scale detection of positive selection in nine primates predicts human-virus evolutionary conflicts’, Nucleic Acids Research, 45(18), pp. 10634–10648. doi: 10.1093/nar/gkx704.

Meredith, R. W. et al. (2009) ‘Molecular decay of the tooth gene enamelin (ENAM) mirrors the loss of enamel in the fossil record of placental mammals’, PLoS Genetics, 5(9). doi: 10.1371/journal.pgen.1000634.

Pierrel, F. et al. (2007) ‘Coa1 links the Mss51 post-translational function to Cox1 cofactor insertion in cytochrome c oxidase assembly’, EMBO Journal, 26(20), pp. 4335–4346. doi: 10.1038/sj.emboj.7601861.

Sharma, S. et al. (2020) ‘Evidence for the loss of plasminogen receptor KT gene in chicken’, Immunogenetics, 72(9–10), pp. 507–515. doi: 10.1007/s00251-020-01186-2.

Wang, C. et al. (2020) ‘MITRAC15/COA1 promotes mitochondrial translation in a ND2 ribosome–nascent chain complex’, EMBO reports, 21(1). doi: 10.15252/embr.201948833.

 

Tuesday, July 27, 2021

Chop, crop and search with a custom cutoff criteria

We have been investigating the presence of putative image duplicates in the paper Sharma et al., 2020 using AI based methods that we evaluated using the established examples from Bik et al., 2016 paper. Despite an exhaustive search of all the supplementary figures, we have not been able to find any exact duplicates in this paper. However, it is possible that parts of the figures are chopped, cropped and pasted in different combinations. This would be similar to cutting out the lanes of a gel image and pasting them together into a new image. As we saw in the previous post, the imagededup package does not perform well when faced with duplication with repositioning (category II).

Today, we try to find a simple solution to this problem by chopping up each image into many small pieces and searching them for presence of putative duplicates. The linux utility "convert" is a very powerful tool with many image manipulation abilities. We use the below code snippet to chop each of the images into five almost equally sized parts with vertical lines.

 for img in `ls -1 *`  
 do  
 echo $img  
 convert $img -crop 5x1@ +repage +adjoin "$img"_%d.png  
 mv "$img"_*.png crop1  
 done  

Each of the images now have 5 parts with filenames that mention the old image id and the part number. For instance, image98.png is cut into five parts named as image98.png_0.png, image98.png_1.png, image98.png_2.png, image98.png_3.png and image98.png_4.png. The for loop in the above code does this chopping for each image and moves the chopped files into the crop1 folder. After the images have been chopped using the crop option in convert utility, we can use the imagededup package to look for putative duplicates.

Approximately 300 images are present in the original dataset obtained from Sharma et al., 2020. After chopping each image into five parts, we have 1500 images to deal with. Manually parsing the output of imagededup for high similarity scores is laborious and best avoided. The code given below detects putative image duplicates among the files located in the image_dir folder and stores the results in the duplicates_cnn dictionary. The first for loop in this case iterates through the keys of this dictionary. The second for loop iterates through the values that are stored for each of these keys. Each value is actually a tuple with the first element being the image file name and the second element being the score. We look for scores greater than the cutoff value defined before the for loop and print the key and keyvalue.

 #Find duplicates using CNN along with scores   
 from imagededup.methods import CNN   
 cnn_encoder = CNN()   
 duplicates_cnn = cnn_encoder.find_duplicates(image_dir=image_dir, scores=True)   
 #arbitrary cutoff score  
 cutoff=0.97  
 for key in duplicates_cnn:  
      for keyvals in duplicates_cnn[key]:  
           if keyvals[1] > cutoff:  
                print(key,keyvals)  

The code above will provide us a shorter version of the output listing only the images that are detected to be putative duplicates with very high scores.Even with a high cutoff score of 0.97, we find more than 200 putative duplicates.

 image100.png_4.png ('image93.png_4.png', 0.9714619)  
 image102.png_0.png ('image103.png_0.png', 0.98250186)  
 image103.png_0.png ('image102.png_0.png', 0.98250186)  
 image11.png_0.png ('image12.png_0.png', 0.9850818)  
 image11.png_0.png ('image14.png_0.png', 0.97351915)  
 image11.png_0.png ('image16.png_0.png', 0.9819039)  
 image11.png_0.png ('image20.png_0.png', 0.9708375)  
 image11.png_0.png ('image7.png_0.png', 0.98577213)  
 image114.png_0.png ('image115.png_0.png', 0.9871844)  
 image114.png_0.png ('image116.png_0.png', 0.977131)  
 image115.png_0.png ('image114.png_0.png', 0.9871844)  
 image115.png_0.png ('image116.png_0.png', 0.982214)  
 image115.png_2.png ('image115.png_3.png', 0.97350514)  
 image115.png_3.png ('image115.png_2.png', 0.97350514)  
 image116.png_0.png ('image114.png_0.png', 0.977131)  
 image116.png_0.png ('image115.png_0.png', 0.982214)  
 image118.png_0.png ('image120.png_0.png', 0.988398)  
 image118.png_0.png ('image121.png_0.png', 0.9891088)  
 image12.png_0.png ('image11.png_0.png', 0.9850818)  
 image12.png_0.png ('image14.png_0.png', 0.97201216)  
 image12.png_0.png ('image16.png_0.png', 0.98974717)  
 image12.png_0.png ('image20.png_0.png', 0.9705702)  
 image12.png_0.png ('image7.png_0.png', 0.9938463)  
 image120.png_0.png ('image118.png_0.png', 0.988398)  
 image120.png_0.png ('image121.png_0.png', 0.9912125)  
 image121.png_0.png ('image118.png_0.png', 0.9891088)  
 image121.png_0.png ('image120.png_0.png', 0.9912125)  
 image122.png_0.png ('image123.png_0.png', 0.98453903)  
 image122.png_0.png ('image124.png_0.png', 0.99413013)  
 image123.png_0.png ('image122.png_0.png', 0.98453903)  
 image123.png_0.png ('image124.png_0.png', 0.98252416)  
 image124.png_0.png ('image122.png_0.png', 0.99413013)  
 image124.png_0.png ('image123.png_0.png', 0.98252416)  
 image124.png_2.png ('image124.png_3.png', 0.9753659)  
 image124.png_3.png ('image124.png_2.png', 0.9753659)  
 image13.png_3.png ('image13.png_4.png', 0.99999994)  
 image13.png_4.png ('image13.png_3.png', 0.99999994)  
 image138.png_0.png ('image139.png_0.png', 0.9742407)  
 image139.png_0.png ('image138.png_0.png', 0.9742407)  
 image139.png_0.png ('image141.png_0.png', 0.9892728)  
 image139.png_0.png ('image174.png_0.png', 0.97267145)  
 image14.png_0.png ('image11.png_0.png', 0.97351915)  
 image14.png_0.png ('image12.png_0.png', 0.97201216)  
 image14.png_0.png ('image16.png_0.png', 0.98304456)  
 image14.png_0.png ('image20.png_0.png', 0.9994699)  
 image14.png_0.png ('image7.png_0.png', 0.9742934)  
 image141.png_0.png ('image139.png_0.png', 0.9892728)  
 image141.png_0.png ('image174.png_0.png', 0.9725107)  
 image141.png_1.png ('image141.png_2.png', 0.97022605)  
 image141.png_2.png ('image141.png_1.png', 0.97022605)  
 image142.png_0.png ('image144.png_0.png', 0.986072)  
 image143.png_0.png ('image145.png_0.png', 0.9743204)  
 image144.png_0.png ('image142.png_0.png', 0.986072)  
 image145.png_0.png ('image143.png_0.png', 0.9743204)  
 image15.png_4.png ('image18.png_4.png', 0.9827007)  
 image151.png_0.png ('image154.png_0.png', 0.97797024)  
 image152.png_0.png ('image153.png_0.png', 0.9902647)  
 image153.png_0.png ('image152.png_0.png', 0.9902647)  
 image153.png_0.png ('image154.png_0.png', 0.97013867)  
 image154.png_0.png ('image151.png_0.png', 0.97797024)  
 image154.png_0.png ('image153.png_0.png', 0.97013867)  
 image156.png_0.png ('image158.png_0.png', 0.97740877)  
 image158.png_0.png ('image156.png_0.png', 0.97740877)  
 image159.png_0.png ('image160.png_0.png', 0.9743622)  
 image159.png_0.png ('image161.png_0.png', 0.9805405)  
 image159.png_1.png ('image159.png_3.png', 0.9810934)  
 image159.png_3.png ('image159.png_1.png', 0.9810934)  
 image16.png_0.png ('image11.png_0.png', 0.9819039)  
 image16.png_0.png ('image12.png_0.png', 0.98974717)  
 image16.png_0.png ('image14.png_0.png', 0.98304456)  
 image16.png_0.png ('image20.png_0.png', 0.98187333)  
 image16.png_0.png ('image7.png_0.png', 0.9959326)  
 image160.png_0.png ('image159.png_0.png', 0.9743622)  
 image161.png_0.png ('image159.png_0.png', 0.9805405)  
 image164.jpg_0.png ('image287.jpg_0.png', 0.9828615)  
 image168.png_0.png ('image169.png_0.png', 0.9929953)  
 image169.png_0.png ('image168.png_0.png', 0.9929953)  
 image174.png_0.png ('image139.png_0.png', 0.97267145)  
 image174.png_0.png ('image141.png_0.png', 0.9725107)  
 image178.png_0.png ('image179.png_0.png', 0.9757037)  
 image179.png_0.png ('image178.png_0.png', 0.9757037)  
 image18.png_4.png ('image15.png_4.png', 0.9827007)  
 image182.png_0.png ('image183.png_0.png', 0.98172903)  
 image183.png_0.png ('image182.png_0.png', 0.98172903)  
 image188.png_0.png ('image189.png_0.png', 0.98023623)  
 image189.png_0.png ('image188.png_0.png', 0.98023623)  
 image192.png_0.png ('image194.png_0.png', 0.9978157)  
 image194.png_0.png ('image192.png_0.png', 0.9978157)  
 image20.png_0.png ('image11.png_0.png', 0.9708375)  
 image20.png_0.png ('image12.png_0.png', 0.9705702)  
 image20.png_0.png ('image14.png_0.png', 0.9994699)  
 image20.png_0.png ('image16.png_0.png', 0.98187333)  
 image20.png_0.png ('image7.png_0.png', 0.9730121)  
 image202.png_0.png ('image203.png_0.png', 0.9940014)  
 image203.png_0.png ('image202.png_0.png', 0.9940014)  
 image211.png_0.png ('image212.png_0.png', 0.98358434)  
 image212.png_0.png ('image211.png_0.png', 0.98358434)  
 image212.png_0.png ('image214.png_0.png', 0.9713317)  
 image214.png_0.png ('image212.png_0.png', 0.9713317)  
 image215.jpeg_0.png ('image215.jpeg_1.png', 0.9919382)  
 image215.jpeg_1.png ('image215.jpeg_0.png', 0.9919382)  
 image219.png_2.png ('image219.png_3.png', 0.97034454)  
 image219.png_3.png ('image219.png_2.png', 0.97034454)  
 image220.png_0.png ('image221.png_0.png', 0.9760274)  
 image221.png_0.png ('image220.png_0.png', 0.9760274)  
 image221.png_2.png ('image221.png_3.png', 0.97269195)  
 image221.png_3.png ('image221.png_2.png', 0.97269195)  
 image23.png_0.png ('image25.png_0.png', 0.97705656)  
 image23.png_2.png ('image26.png_2.png', 0.97086954)  
 image234.png_0.png ('image235.png_0.png', 0.99267024)  
 image234.png_1.png ('image234.png_2.png', 0.97507715)  
 image234.png_2.png ('image234.png_1.png', 0.97507715)  
 image235.png_0.png ('image234.png_0.png', 0.99267024)  
 image237.png_0.png ('image238.png_0.png', 0.9760754)  
 image238.png_0.png ('image237.png_0.png', 0.9760754)  
 image238.png_0.png ('image239.png_0.png', 0.9754666)  
 image239.png_0.png ('image238.png_0.png', 0.9754666)  
 image242.png_0.png ('image243.png_0.png', 0.9714698)  
 image243.png_0.png ('image242.png_0.png', 0.9714698)  
 image245.png_0.png ('image246.png_0.png', 0.97148263)  
 image245.png_0.png ('image247.png_0.png', 0.97165793)  
 image246.png_0.png ('image245.png_0.png', 0.97148263)  
 image246.png_0.png ('image247.png_0.png', 0.9809675)  
 image247.png_0.png ('image245.png_0.png', 0.97165793)  
 image247.png_0.png ('image246.png_0.png', 0.9809675)  
 image25.png_0.png ('image23.png_0.png', 0.97705656)  
 image257.png_0.png ('image258.png_0.png', 0.98425305)  
 image257.png_0.png ('image259.png_0.png', 0.9732449)  
 image258.png_0.png ('image257.png_0.png', 0.98425305)  
 image258.png_0.png ('image259.png_0.png', 0.98271394)  
 image259.png_0.png ('image257.png_0.png', 0.9732449)  
 image259.png_0.png ('image258.png_0.png', 0.98271394)  
 image26.png_2.png ('image23.png_2.png', 0.97086954)  
 image262.png_0.png ('image263.png_0.png', 0.9708605)  
 image263.png_0.png ('image262.png_0.png', 0.9708605)  
 image265.png_0.png ('image266.png_0.png', 0.985058)  
 image265.png_0.png ('image267.png_0.png', 0.97712684)  
 image266.png_0.png ('image265.png_0.png', 0.985058)  
 image266.png_0.png ('image267.png_0.png', 0.9758965)  
 image267.png_0.png ('image265.png_0.png', 0.97712684)  
 image267.png_0.png ('image266.png_0.png', 0.9758965)  
 image270.png_1.png ('image270.png_2.png', 0.97145426)  
 image270.png_2.png ('image270.png_1.png', 0.97145426)  
 image271.png_1.png ('image271.png_2.png', 0.97522026)  
 image271.png_2.png ('image271.png_1.png', 0.97522026)  
 image273.png_0.png ('image274.png_0.png', 0.9760238)  
 image274.png_0.png ('image273.png_0.png', 0.9760238)  
 image274.png_0.png ('image275.png_0.png', 0.97969353)  
 image274.png_1.png ('image274.png_3.png', 0.9715067)  
 image274.png_3.png ('image274.png_1.png', 0.9715067)  
 image275.png_0.png ('image274.png_0.png', 0.97969353)  
 image277.png_0.png ('image278.png_0.png', 0.9858266)  
 image277.png_0.png ('image279.png_0.png', 0.98131776)  
 image278.png_0.png ('image277.png_0.png', 0.9858266)  
 image278.png_0.png ('image279.png_0.png', 0.9779868)  
 image279.png_0.png ('image277.png_0.png', 0.98131776)  
 image279.png_0.png ('image278.png_0.png', 0.9779868)  
 image287.jpg_0.png ('image164.jpg_0.png', 0.9828615)  
 image63.png_0.png ('image71.png_0.png', 0.99036366)  
 image7.png_0.png ('image11.png_0.png', 0.98577213)  
 image7.png_0.png ('image12.png_0.png', 0.9938463)  
 image7.png_0.png ('image14.png_0.png', 0.9742934)  
 image7.png_0.png ('image16.png_0.png', 0.9959326)  
 image7.png_0.png ('image20.png_0.png', 0.9730121)  
 image71.png_0.png ('image63.png_0.png', 0.99036366)  
 image83.png_0.png ('image86.png_0.png', 0.9774096)  
 image83.png_0.png ('image92.png_0.png', 0.9701129)  
 image83.png_0.png ('image98.png_0.png', 0.9754302)  
 image83.png_2.png ('image86.png_2.png', 0.97005486)  
 image83.png_3.png ('image86.png_3.png', 0.9776021)  
 image83.png_4.png ('image86.png_4.png', 0.97311985)  
 image85.png_0.png ('image87.png_0.png', 0.9724677)  
 image85.png_0.png ('image93.png_0.png', 0.9737506)  
 image85.png_0.png ('image96.png_0.png', 0.9903543)  
 image85.png_0.png ('image99.png_0.png', 0.98590815)  
 image85.png_2.png ('image96.png_2.png', 0.98394686)  
 image85.png_3.png ('image96.png_3.png', 0.9750851)  
 image86.png_0.png ('image83.png_0.png', 0.9774096)  
 image86.png_0.png ('image92.png_0.png', 0.9725857)  
 image86.png_0.png ('image98.png_0.png', 0.97047156)  
 image86.png_2.png ('image83.png_2.png', 0.97005486)  
 image86.png_3.png ('image83.png_3.png', 0.9776021)  
 image86.png_4.png ('image83.png_4.png', 0.97311985)  
 image87.png_0.png ('image85.png_0.png', 0.9724677)  
 image87.png_0.png ('image89.png_0.png', 0.97378576)  
 image87.png_0.png ('image99.png_0.png', 0.9758906)  
 image89.png_0.png ('image87.png_0.png', 0.97378576)  
 image90.png_3.png ('image98.png_3.png', 0.9723841)  
 image92.png_0.png ('image83.png_0.png', 0.9701129)  
 image92.png_0.png ('image86.png_0.png', 0.9725857)  
 image93.png_0.png ('image85.png_0.png', 0.9737506)  
 image93.png_0.png ('image96.png_0.png', 0.9713357)  
 image93.png_4.png ('image100.png_4.png', 0.9714619)  
 image96.png_0.png ('image85.png_0.png', 0.9903543)  
 image96.png_0.png ('image93.png_0.png', 0.9713357)  
 image96.png_0.png ('image99.png_0.png', 0.9820196)  
 image96.png_2.png ('image85.png_2.png', 0.98394686)  
 image96.png_3.png ('image85.png_3.png', 0.9750851)  
 image98.png_0.png ('image83.png_0.png', 0.9754302)  
 image98.png_0.png ('image86.png_0.png', 0.97047156)  
 image98.png_3.png ('image90.png_3.png', 0.9723841)  
 image99.png_0.png ('image85.png_0.png', 0.98590815)  
 image99.png_0.png ('image87.png_0.png', 0.9758906)  
 image99.png_0.png ('image96.png_0.png', 0.9820196)  

The use of a more stringent criteria of 0.99 results in a more managable list:

 image12.png_0.png ('image7.png_0.png', 0.9938463)  
 image120.png_0.png ('image121.png_0.png', 0.9912125)  
 image121.png_0.png ('image120.png_0.png', 0.9912125)  
 image122.png_0.png ('image124.png_0.png', 0.99413013)  
 image124.png_0.png ('image122.png_0.png', 0.99413013)  
 image13.png_3.png ('image13.png_4.png', 0.99999994)  
 image13.png_4.png ('image13.png_3.png', 0.99999994)  
 image14.png_0.png ('image20.png_0.png', 0.9994699)  
 image152.png_0.png ('image153.png_0.png', 0.9902647)  
 image153.png_0.png ('image152.png_0.png', 0.9902647)  
 image16.png_0.png ('image7.png_0.png', 0.9959326)  
 image168.png_0.png ('image169.png_0.png', 0.9929953)  
 image169.png_0.png ('image168.png_0.png', 0.9929953)  
 image192.png_0.png ('image194.png_0.png', 0.9978157)  
 image194.png_0.png ('image192.png_0.png', 0.9978157)  
 image20.png_0.png ('image14.png_0.png', 0.9994699)  
 image202.png_0.png ('image203.png_0.png', 0.9940014)  
 image203.png_0.png ('image202.png_0.png', 0.9940014)  
 image215.jpeg_0.png ('image215.jpeg_1.png', 0.9919382)  
 image215.jpeg_1.png ('image215.jpeg_0.png', 0.9919382)  
 image234.png_0.png ('image235.png_0.png', 0.99267024)  
 image235.png_0.png ('image234.png_0.png', 0.99267024)  
 image63.png_0.png ('image71.png_0.png', 0.99036366)  
 image7.png_0.png ('image12.png_0.png', 0.9938463)  
 image7.png_0.png ('image16.png_0.png', 0.9959326)  
 image71.png_0.png ('image63.png_0.png', 0.99036366)  
 image85.png_0.png ('image96.png_0.png', 0.9903543)  
 image96.png_0.png ('image85.png_0.png', 0.9903543)  

Even this shorter list has 28 hits. Closer manual inspection of these hits highlights the difficulties involved in this chop and search stratergy. The extremely promising hit of image 13 parts 3 and 4 is actually due to these two images being just the canvas. Similarly, the hit seen between part 0 of image 14 and image 20 are due to the presence of the same human karyotype in both these images. However, the original images are distinct enough as they are screenshots showing the synteny relationship of the same human chromosome with very different species.

Self-criticism seems to be trending this month. Many thanks to the brave/crazy Nicholas P. Holmes for sharing his thougts on this. Even seemingly disastorous events such as retracting a paper have achieved glory. Cost of doing science continues to increase. Whether we will see a long-term change and how the reward system will evaluate honest science vs exceptional science is unclear.



Saturday, July 24, 2021

Beautiful, More Beautiful and Most Beautiful. The maxim of Nicolaus Steno

 If you don't know who is Nicolaus Steno, you can look at the below video. 


Now that you know who is Nicolaus Steno, you will appreciate his maxim about the importance of understanding and comprehending. In the previous post, we looked at how the paper by Sharma et al 2020 has many figures in the supplementary that are detected as putative duplicates of each other. While the imagededup package we used has been benchmarked by its authors, we would need to verify its abilities using a set of images that are known to be duplicated for use in Fakery.  Thankfully, the Bik et. al., 2016 paper does a very thorough job of grouping the types of fakery into the following classes:

  1. Category I: simple duplications (https://journals.asm.org/doi/10.1128/mBio.00809-16#fig2)
  2. Category II: duplication with repositioning (https://journals.asm.org/doi/10.1128/mBio.00809-16#fig3)
  3. Category III: duplication with alteration (https://journals.asm.org/doi/10.1128/mBio.00809-16#fig4)

It is possible to test the imagededup package on these verified fakeries. However, to do that we need to cut out each of these image parts identified by Bik et. al., 2016 and create a dataset on which the code can be executed. This dataset is uploaded on github (https://github.com/Corvus7/Fakery.git) and may serve as a training dataset for future efforts at developing AI-based solutions. The full code used and the results are provided below:
 cd  
 git clone https://github.com/Corvus7/Fakery.git  
 image_dir='~/Fakery/bik2016/Fig2/'  
 from imagededup.methods import CNN   
 cnn_encoder = CNN()   
 duplicates_cnn = cnn_encoder.find_duplicates(image_dir=image_dir, scores=True)   
 duplicates_cnn   
 {'Blue_1.png': [('Blue_2.png', 0.9211361)], 'Blue_2.png': [('Blue_1.png', 0.9211361)], 'Figure_2_cut_out.jpeg': [], 'Green_1.png': [('Green_2.png', 0.95247614)], 'Green_2.png': [('Green_1.png', 0.95247614)], 'Red_1.png': [('Red_2.png', 0.90385926)], 'Red_2.png': [('Red_1.png', 0.90385926)]}  
 image_dir='~/Fakery/bik2016/Fig3/'  
 from imagededup.methods import CNN   
 cnn_encoder = CNN()   
 duplicates_cnn = cnn_encoder.find_duplicates(image_dir=image_dir, scores=True)   
 duplicates_cnn   
 {'Blue_1.png': [], 'Blue_2.png': [], 'Figure_3_cut_out.jpeg': [], 'Green_1.png': [], 'Green_2.png': [], 'Red_1.png': [], 'Red_2.png': []}  
 image_dir='~/Fakery/bik2016/Fig4/'  
 from imagededup.methods import CNN   
 cnn_encoder = CNN()   
 duplicates_cnn = cnn_encoder.find_duplicates(image_dir=image_dir, scores=True)   
 duplicates_cnn   
 {'Blue_first.png': [('Blue_second.png', 0.97069657)], 'Blue_second.png': [('Blue_first.png', 0.97069657)], 'Full_screenshot.png': [], 'Green_first.png': [('Green_second.png', 0.98090243)], 'Green_second.png': [('Green_first.png', 0.98090243)], 'Lane_10.png': [('Lane_9.png', 0.90004313)], 'Lane_9.png': [('Lane_10.png', 0.90004313)], 'Orange_first.png': [('Orange_second.png', 0.9222448)], 'Orange_second.png': [('Orange_first.png', 0.9222448)], 'Pink_first.png': [('Pink_second.png', 0.9387925)], 'Pink_second.png': [('Pink_first.png', 0.9387925)], 'Purple_first.png': [('Purple_second.png', 0.95602536)], 'Purple_second.png': [('Purple_first.png', 0.95602536)], 'Red_first.png': [('Red_second.png', 0.9667898)], 'Red_second.png': [('Red_first.png', 0.9667898)], 'orange_first.png': [('orange_second.png', 0.91980916)], 'orange_second.png': [('orange_first.png', 0.91980916)]}  
The results are a bit surprising. Category II duplicates are not at all picked up by the CNN method. The correct figures are tagged as duplicates in Category I and Category III. However, the scores range from 0.9 all the way up to 0.98. This suggests that these scores themselves are not any reliable indicators and manual inspection is definitely required. AI-based methods like imagededup need a lot more sophistication to allow their widespread use in anti-fakery approaches. As far as the paper by Sharma et al 2020 is concerned, the raw data in the form of SAM files are provided in the supplementary materials. Running the samtools split command will separate out each of the sub-components by read group.