Hi everyone(adsbygoogle = window.adsbygoogle || []).push({});

I am new to Fortran, I am trying to write a program to read a .txt file in which i have 24480 rows and ~ 6000 columns.

In each row (as individuals) i have genotypes indicated as 1 and 2, which if, for example, in row one, i have had 204 genotypes, first half of this genotypes (=102) belongs to individual's sire and second half of genotypes belongs to individual's dam. In addition each row has not equal values. So, how can i define for Fortran to read this file row by row and divide each row to two and put beside each element (i) to the mean+i.

For example i show two rows of my file as brief:

row1: 112122121112122111112121111211122121111121

row2: 21112111112112222121112121211121221212121111121112 1212

And so on.

Any help would be appreciated in advance.

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Help about Fortran

Loading...

Similar Threads - Help Fortran | Date |
---|---|

I need help in Fortran please -- Bairstow's method & Newton-Raphson | Nov 26, 2016 |

Need help with FORTRAN | Jun 8, 2016 |

Fortran compile error I can't figure out | Jan 15, 2016 |

Help about Fortran | Sep 13, 2015 |

[Fortran] Help Reading Complex 2D data | Jul 14, 2015 |

**Physics Forums - The Fusion of Science and Community**