Question: RNA Seq pipeline
0
gravatar for aj123
2.1 years ago by
aj12370
United States
aj12370 wrote:

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.

ADD COMMENTlink modified 2.1 years ago by Frédéric Bigey260 • written 2.1 years ago by aj12370

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 REPLYlink written 2.1 years ago by Ram16k

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 REPLYlink written 2.1 years ago by Istvan Albert ♦♦ 77k
1

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

ADD REPLYlink written 2.1 years ago by Ram16k

Hi,

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

ADD REPLYlink written 2.1 years ago by Ram16k
0
gravatar for Frédéric Bigey
2.1 years ago by
Montpellier, France
Frédéric Bigey260 wrote:

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 COMMENTlink written 2.1 years ago by Frédéric Bigey260
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 661 users visited in the last hour