Recent content by Sue Parks

  1. S

    Text file that is read into an array

    This is a practice simulation in fortran. I have a good foundation in Python. We (YOU & I) know Fortran is not the best way to go about solving this problem, but it can be done.
  2. S

    Text file that is read into an array

    How could I count the number of characters in my variable baseq?
  3. S

    Text file that is read into an array

    subroutine countAminoAcids: input: array (baseq) output: count of total amino acids subroutine AAFrequencyTitin input: array(baseq) output: frequency count of all amino acids
  4. S

    Text file that is read into an array

    That was extremely helpful! I have another question. I have a short algorithm to help determine the Amino acid frequency. Could you take a look? I am just giving you an example of what I am thinking, mostly because I am not 100% sure how to extract the information from the array (baseq in...
  5. S

    Text file that is read into an array

    I was trying to remove the header (first line of the file). How would I call the subroutine from the main. I just want to make sure the characters are in an array. I'm close! output: Sues-MacBook-Air:fortran sueparks$ gfortran a.f90 Sues-MacBook-Air:fortran sueparks$ ./a.out Backtrace for...
  6. S

    Text file that is read into an array

    I'm stuck program aa character*20:: filename = "TitinFastaFormat.txt" character*10000 :: baseq call readfile(filename, baseq) !deallocate end program aa subroutine readfile(filename, baseq) implicit none integer...
  7. S

    Text file that is read into an array

    ok. Let me see. I have been going in circles.
  8. S

    Text file that is read into an array

    I'm not sure how to use the subroutine to take in the file and put the characters in an array. I may have some problems declaring the array in the subroutine and in the main program
  9. S

    Text file that is read into an array

    I was under the assumption that Fortran read files line by line. The empty Read(102,*) was to skip that line of the file. I may be wrong.
  10. S

    Text file that is read into an array

    I know the subroutine is long. How do I manipulate the intent to get my array to print? I fixed this command end program aa . . . Read(102, iostat = eof) stringFile
  11. S

    Text file that is read into an array

    I am having some difficulty taking my first program and converting that to a subroutine. I was only working the text file. I was trying to get the sequence to print to the screen. program aa character:: filename*20 character, allocatable :: baseq(:)...
  12. S

    Text file that is read into an array

    I am using fortran for the first time. Typically, I would do this type of problem in Python or BioPython. As you can see, the first line is a header. That is the first 4 lines of the FASTA file of the human gene Titin. I have another FASTA file (with a probe). I would like to read these...
  13. S

    Text file that is read into an array

    Three subroutines makes more sense. Question: could I have two more subroutines that add the characters to an array. What would be the best way to sort through the parameters?
  14. S

    Text file that is read into an array

    I have a program "probe.f90" that reads in a text file. It runs. I am having trouble reading in the second text file (when prompted by user). How could I turn this bit of code into a function? I was thinking about a function that strips the header from the fasta file. Then read into an...
Back
Top