This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Comparing Novel RNA Sequences

Hello,

I have two .txt files. Both files contain data regarding splice junctions and I'd like to create a very simple bar graph to see the distribution of Novel RNA sequences. The splice junctions come out of two different mapping methods.

I have written some python code but am a novice so I am having some difficulty in debugging. Here is my code:

# This script will plot the comparison between the BodyMap Gencode & BodyMap RefSeq paired end data.

import matplotlib.pyplot as plt
import numpy as np


#Reading in the files

with open("Illumina_Heart_Gencode_Aligned_Novel_Junctions.txt") as f:
        data = f.read()

data = data.split('\n')

x = [row.split(' ')[0] for row in data]
y = [row.split(' ')[1] for row in data]

fig = plt.figure()

ax1 = fig.add_subplot(111)

ax1.set_title("BodyMap Gencode Vs. RefSeq")
ax1.set_xlabel("Novel & Splice Junctions")
ax1.set_ylabel("Something")

ax1.plot(x,y, c='r', label='the data')

leg = ax1.legend()

plt.show()

I'd like to read in the 6th and 7th columns from both text files for comparison, rest of the columns are immaterial. Could I receive some pointers?

Thank you,

matplotlib rna-seq

You might want to provide more information on your original files. You mention two files but you are only reading in one in your code. You say you want columns 6 ad 7, but are they numbers? Strings? What do they represent? Is it junction expression? Is it the junction ID?

0 answers

No answers yet.

Log in to answer this question.