RNA Seq pipeline
1
0
Entering edit mode
7.9 years ago
aj123 ▴ 120

Hi,

Im trying to create a simple RNA Seq pipeline from fastqc to DE in python (or perl). I want to read in a configuration file with paired end data like this:

Sample1 x_1.fastq x_2.fastq

Sample 2 y_1.fastq y_2.fastq

I would want to read it into an array and pull out each filename. Please do let me know how to get started with this.

RNA-Seq pipeline python sequencing perl • 2.4k views
ADD COMMENT
0
Entering edit mode

Hello anjanaram1!

We believe that this post does not fit the main topic of this site.

This is a language-specific file IO question. Please search stackoverflow.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

ADD REPLY
0
Entering edit mode

I think the better response here would be to ask the original poster to clarify her intent. Reading in a file is not all that uncommon task to cause problems.

ADD REPLY
1
Entering edit mode

Hmmm, you are correct. I took this call based on history - something I should use more judiciously, I think.

ADD REPLY
0
Entering edit mode

Hi,

Can you please give us some details on what you have tried and where you face difficulties please? Thank you!

ADD REPLY
0
Entering edit mode
7.8 years ago

my_config:

x_1.fastq x_2.fastq
y_1.fastq y_2.fastq

Save the perl code below in file script.pl:

while (<>) {
    chomp;
    m/([.\w]+)\s+([.\w]+)/;
    push @array, [$1, $2];
}

print $array[0][0]," and ", $array[0][1], "\n";
print $array[1][0]," and ", $array[1][1], "\n";

Then use it :

$ perl script.pl < my_config

The ouput should be:

x_1.fastq and x_2.fastq
y_1.fastq and y_2.fastq
ADD COMMENT

Login before adding your answer.

Traffic: 1921 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6